title: At what point does the segfault occur?
body: <p>Does the following code segfault at <code>array[10] = 22</code> or <code>array[9999] = 22</code>?<br />
  I'm just trying to figure out if the whole code would execute before it seg faults. (in the C language).</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main(){
  
  int array[10];
  int i;
  for(i=0; i&lt;9999; ++i){
      array[i] = 22;
  }    
  return 0;    
  }
  </code></pre>