title: Dynamic array initialization in c
body: <p>According to <code>C99</code> standards we can do this</p>
  
  <pre><code>int n = 0;
  scanf("%d",&amp;n);
  int arr[n];
  </code></pre>
  
  <p>this is one of the way to create dynamic array in c. Now I want to initialize this array to <code>0</code> like this</p>
  
  <pre><code>int arr[n] = {0};
  </code></pre>
  
  <p>Here my compiler producing error.
  I want to know can we do this? Is it according to standard? At compile time we provide sufficient memory for arrays, but here it is unknown at compile time. How it is happening?</p>