C语言的数组能够用变量定义吗?

今天碰到这个问题,所以写了个小程序测试了一下.小程序 #include <stdio.h> int num = 0; void test() { char a[num]; printf("%d\n", sizeof(a)); } int main() { num = 10; test(); num = 11; test(); } 是否正确? 运行结果
相关文章
相关标签/搜索