结构体数组初始化(C 语言)
结构体数组在定义时可同时初始化。语法:
struct student {
int num;
char name[20];
int score;
};
struct student a[2] = {
{1001, "LiLi", 85},
{1002, "Wang", 90}
};
1.13MB
文件大小:
评论区