title: Difference between *ptr[10] and (*ptr)[10]
body: <p>For the following code:</p>
  
  <pre><code>    int (*ptr)[10];
      int a[10]={99,1,2,3,4,5,6,7,8,9};
      ptr=&amp;a;
      printf("%d",(*ptr)[1]);
  </code></pre>
  
  <p>What should it print? I'm expecting the garbage value here but the output is <code>1</code>.<br>
  (for which I'm concluding that initializing this way pointer array i.e <code>ptr[10]</code> would start pointing to elements of <code>a[10]</code> in order).</p>
  
  <p>But what about this code fragment:</p>
  
  <pre><code>int *ptr[10];
  int a[10]={0,1,2,3,4,5,6,7,8,9};
  *ptr=a;
  printf("%d",*ptr[1]);
  </code></pre>
  
  <p>It is giving the segmentation fault.</p>