定义一个含有20个元素的结构体数组,用来存储20个学生的个人资料,其中包括学生的学号,姓名,性别,年龄

2024-11-29 18:19:42
推荐回答(1个)
回答1:

#define Max_Infor_Size 30
#define Max_Name_Size 20
#define Max_Number_Size 10
#define Max_Touch_Infor_Size 50
#define Max_Class_Name_Size 15
typedef struct S_Information
{
char Name[Max_Name_Size];
char Number[Max_Number_Size];
char Class_Name[Max_Class_Name_Size];
char Sex;
int Age;
char Way_To_Get_In_Touch[Max_Touch_Infor_Size];
}Student;
Student Student_Information[Max_Infor_Size];

希望能对你有所帮助!