title: What is the simplest standard conform way to produce a Segfault in C?
body: <p>I think the question says it all. An example covering most standards from C89 to C11 would be helpful. I though of this one, but I guess it is just undefined behaviour:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main( int argc, char* argv[] )
  {
    const char *s = NULL;
    printf( "%c\n", s[0] );
    return 0;
  }
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>As some votes requested clarification: I wanted to have a program with an usual programming error (the simplest I could think of was an segfault), that is <em>guaranteed</em> (by standard) to abort. This is a bit different to the minimal segfault question, which don't care about this insurance.</p>