Array size can’t be declared at run time. Size of array must be known during compilation time. So, array size should be declared before compilation.
Correct example: char array [10];
Wrong example: char array[i];
Always, Array subscript should be positive and it should not be either negative or any variable name.
If we really don’t know the size of an array, we can use dynamic memory allocation concepts in C which uses malloc(), calloc() functions to allocate memory during execution time.
Array size can’t be declared at run time. Size of array must be known during compilation time. So, array size should be declared before compilation.