title: variable length arrays in C and initializing it in place
body: <p>C99 allows defining arrays with non-constant size, i.e. the size used to define an array can change on runtime. Code snippet to explain it would be,</p>
  
  <pre><code>void dummy_function1(unsigned int length) {
  
   char arrA[length];  //Allowed
   .
   .
  }
  </code></pre>
  
  <p>However, it does not allow initializing it in place, i.e.</p>
  
  <pre><code>void dummy_function2(unsigned int length) {
  
   char arrA[length]={0}; //Not Allowed, compiler throws an error
   char arrB[10]={0};     //Allowed
   .
  }
  </code></pre>
  
  <p>I do not understand, why is this difference in behavior for array which is variable length and the one which is constant length. In both cases, the array would be given memory when the function is invoked.</p>