title: size of array of pointers
body: <p>i have a doubt regarding sizeof operator</p>
  
  <p>Code 1:</p>
  
  <pre><code>int main()
  {
      int p[10];
      printf("%d",sizeof(p));   //output -- 40
      return 0;
  }
  </code></pre>
  
  <p>Code 2:</p>
  
  <pre><code>int main()
  {
      int *p[10];
      printf("%d",sizeof(*p));   //output -- 4
      return 0;
  }
  </code></pre>
  
  <p>in the first code p points to an array of ints.
  in the second code p points to an array of pointers.
  i am not able to understand why the first code o/p is 40 but 2nd code o/p is 4 thought both points to an array of the same size ?</p>