title: number of elements exceed the size declared in array in c
body: <pre><code>int main(void)
  
  {
  
  int b[5] = {1,2,3,4,5,6,7,8,9,10}; 
  
  int i;
  
  for(i=0;i&lt;9;i++)
  {
     printf(&quot; %d &quot;,b[i]); 
  }
   printf(&quot;\n address : %u&quot;,b);
  
  return 0;
  }
  </code></pre>
  <p>This is C program in which number of elements exceeds declared size. when i iterate through array it prints following output-</p>
  <pre><code>1 2 3 4 5 5 6422284 3854336 6422352
  
  address : 6422288
  </code></pre>
  <p>compiler - gcc</p>
  <p>i don't understand</p>
  <ol>
  <li>why 5 is printed twice</li>
  <li>why only 9 values are printed instead of 10</li>
  </ol>