title: Why sizeof(array) and sizeof(&array[0]) gives different results?
body: <pre><code>#include &lt;stdio.h&gt;
  int main(void){
      char array[20];
  
      printf( "\nSize of array is %d\n", sizeof(array) );  //outputs 20
      printf("\nSize of &amp;array[0] is %d\n", sizeof(&amp;array[0]); //output 4
  }
  </code></pre>
  
  <p>Code above gives <code>20</code> for <code>sizeof(array)</code> and <code>4</code> for <code>sizeof(&amp;array[0])</code>. </p>
  
  <p>What I knew was instead of giving array as a argument, its first element can be passed. Shouldn't they give same output as 20? and why <code>&amp;array[0]</code> gives 4 as result? char is stored in 1 byte as far as I know?</p>