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

2024-07-10 李腾 47 次阅读 0 次点赞

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];
}
本文由人工编写,AI优化,转载请注明原文地址: C语言开发示例:22. 变长数组

评论 (0)

登录后发表评论

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