正在加载图片...
91结构体 结构体类型与变量的说明 struct date f int year, month, day; ); num 8个字节 struct student name 30个字节 i char num 8; 1个字节 char name 30: year2个字节 char sex: struct date birthday birthday month2个字节 char addr 60l day|2个字节 int score]; addr 60个字节 score 12个字节 对象 2021-2-242021-2-24 7 Ø 应先定义一个 ,而后再定义 。 Ø 系统对 不分配空间,仅对 分配空间。 Ø 只能对 赋值、存取或运算,而不能对一个 赋值、存取或运算。 不 同结构体类型的成员名相同, struct date { int year,month,day;}; struct student { char num[8]; char name[30]; char sex; birthday; /* 成员为结构体类型 */ char addr[60]; int score[6]; };
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有