According to C99
standards we can do this
int n = 0;
scanf("%d",&n);
int arr[n];
this is one of the way to create dynamic array in c. Now I want to initialize this array to 0
like this
int arr[n] = {0};
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?