I am new to C programming. I am trying to set the size of the array using a variable but I am getting an error: Storage size of \'array\' isn\'t constant !!
What you want is possible in C99; however, with earlier versions of C, you are stuck calling functions to dynamically allocate memory, e.g. alloca(3) or malloc(3).