title: Initializing variable length array
body: <p>On initializing a Variable length array compiler gives an error message:  </p>
  
  <pre><code>[Error] variable-sized object may not be initialized  
  </code></pre>
  
  <p>Code snippet:</p>
  
  <pre><code>int n; 
  printf("Enter size of magic square: ");
  scanf("%d",&amp;n);
  
  int board[n][n] = {0};
  </code></pre>
  
  <p>How should <strong>Variable Length arrays</strong> be initialized?
  And why it's all elements are not initialized to <code>0</code> in the way give below;</p>
  
  <pre><code>   int board[n][n];
     board[n][n] = {0};
  </code></pre>
  
  <p>?</p>