title: How to parallelize this array sum using OpenMP?
body: <p>How can I make this array sum is parallelized using OpenMP ?
  what should be shared, and what should be private ? </p>
  
  <p>Here is the code for array sum ..</p>
  
  <pre><code>main()         
  {        
      int a[10], i, n, sum=0;    
  
      printf("enter no. of elements");
      scanf("%d",&amp;n); 
      printf("enter the elements");   
  
      for(i=0;i&lt;n;i++)    
          scanf("%d",&amp;a[i]);
  
      for (i=0;i&lt;n;i++)
          sum=sum+a[i];
  
      for(i=0;i&lt;n;i++)
          printf("\n a[%d] = %d", i, a[i]);
  
      printf("\n sum = %d",sum);
  
  }
  </code></pre>