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,
void dummy_function1(unsigned int length) {
char arrA[length]; //Allowed
.
.
}
However, it does not allow initializing it in place, i.e.
void dummy_function2(unsigned int length) {
char arrA[length]={0}; //Not Allowed, compiler throws an error
char arrB[10]={0}; //Allowed
.
}
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.