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

2024-07-10 11:32:43 2025-02-01 20:05:13 李腾 24 次阅读 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优化,请仔细甄别,转载请注明转自www.hylab.cn,原文地址:C语言开发示例:22. 变长数组

评论 (0)

登录后发表评论

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