结构体类型变量定义
使用struct关键字同时定义结构体类型和变量,例如:
struct student {
int num;
char name[20];
char sex;
int age;
float score;
char addr[30];
};
struct student s1, s2;
此代码定义了一个名为student的结构体类型,并定义了两个该类型的变量s1和s2。
文件大小:2.2MB
评论区