知识库

C语言开发示例:22. 变长数组

2025-02-01 20:05:13 李腾 1 次阅读

extend_array.c

#include <stdio.h>

int main()
{
#ifdef __STDC_NO_VLA__
    printf("Variable length arrays are not supported.\n");
    exit(1);
#endif

    size_t size;
    printf("input size: ");
    scanf("%d", &size);
    int grades[size];
}
转载请注明转自www.hylab.cn,原文地址:C语言开发示例:22. 变长数组

评论 (0)

登录后发表评论

暂无评论,快来发表第一条评论吧!