title: Expected segmentation fault, as soon as assigning a value to index 1?
body: <p>In the code snippet, I expected a segmentation fault as soon as trying to assign a value to <code>count[1]</code>. However the code continues and executes the second for-loop, only indicating a segmentation fault when the program terminates. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
          int count[1];
          int i;
  
          for(i = 0; i &lt; 100; i++)
          {
                  count[i] = i;
          }
          for(i = 0; i &lt; 100; i++)
          {
                  printf("%d\n", count[i]);
          }
          return 0;
  }
  </code></pre>
  
  <p>Could someone explain what is happening?</p>
  
  <p><strong>Reasons for edit:</strong>
  Improved the example code as per comments of users,
  <code>int count[0] -&gt; int count[1]</code>, 
  too avoid flame wars.</p>