title: Does C11 allow variable declarations at any place in a function?
body: <p>Does the C11 standard (note I don't mean C++11) allow you to declare variables at any place in a function?</p>
  
  <p>The code below is not valid in ANSI C (C89, C90):</p>
  
  <pre><code>int main()
  {
    printf("Hello world!");
    int a = 5; /* Error: all variables should be declared at the beginning of the function. */
    return 0;
  }
  </code></pre>
  
  <p>Is it valid source code in C11?</p>