title: array taking more input than definition
body: <pre><code> #include &lt;stdio.h&gt;
   int main(void)
   {
      int n,i;
      scanf("%d",&amp;n);
      int a[n];
      for(i=0;i&lt;n;i++)
      {
          a[i]=i;
      printf("%d",a[i]);
  
      }
      for(i=0;i&lt;n+1;i++)
      {
          a[i]=i;
          printf("%d",a[i]);
  
      }       
      return 0;   
   }
  </code></pre>
  
  <p><em>here if we give any input eg 5 then output is...
  01234012345  here question is that code should give an error but insted it prints 5 which is stored in a[5] &amp; a[5] is undeclared</em></p>