We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

A.21 Scoping Variables with the private Clause

The values of i and j in the following example are undefined on exit from the parallel region:

int i, j;
i = 1;
j = 2;
#pragma omp parallel private(i) firstprivate(j)
  i = 3;
  j = j + 2;
printf_s("%d %d\n", i, j);

For more information on the private clause, see Section on page 25.