不能用c99的情况下,如何动态定义数组的长度
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
{
int number;
int i;
int*a;
scanf("%d",&number);
//int a[number];
a=malloc(number*sizeof(int));
for (i = 0; i < number; ++i)
{
scanf("%d",&a[i]);
}
for ( i = number-1; i >=0; i--)
{
printf("%d\n",a[i] );
}
free(a);
return 0;
}