variably modified array at file scope in C

You can not have static array which size is given as a variable

That’s why constants should be #defined:

#define a 6

This way preprocessor will replace a with 6, making it valid declaration.

Leave a Comment