title: The following code resulting in either garbage or access violation error why is it so...?
body: <p>file1.c </p>
  
  <pre><code>int a[3]={1,39,7}; /* definition */
  </code></pre>
  
  <p>file2.c </p>
  
  <pre><code>extern int a[]; /* declaration */
  b = a[2]; /* correct usage in file2.c */
  </code></pre>
  
  <p>file3.c </p>
  
  <pre><code>extern int *a; /* another declaration */
  c = a[1]; /* a[1] is *(a+1), fails! */
  </code></pre>
  
  <p>The usage in file2 obtains the 3rd element (7) of a, but the
  usage in file2 interprets 39 as an address (assuming 32
  bit integers and addresses), resulting in either garbage or
  access violation error why is it so...?</p>