title: Difference between omp for and omp parallel
body: <p>I have this code :</p>
  
  <pre><code>#include &lt;omp.h&gt;
  #include &lt;stdio.h&gt;
  
  int main(){
      int i,j = 0 ;
      int tid;
      # pragma omp parallel private(i,j,tid)
      {
         tid = omp_get_thread_num();
         printf("Thread %d\n",tid);
         for(i=0;i&lt;10;i++){
            # pragma omp for
            for(j=0; j&lt;10;j++){
               tid = omp_get_thread_num();
               printf("(i,j) = (%d,%d) Thread %d\n",i,j,tid);
            }
         }
       }
       return 0;
  }
  </code></pre>
  
  <p>Why the first "printf" is executed by each thread but not the second?</p>