第10章結构体与共用体.docVIP

  • 115
  • 0
  • 约2.64万字
  • 约 33页
  • 2016-12-08 发布于重庆
  • 举报
第10章結构体与共用体

第十章 结构体与共用体 10.1 选择题 10.1 已知学生记录描述为 struct student { int no; char name[20]; char sex; struct { int year; int month; int day; }birth; }; struct student s; 设变量s中的“生日”应是“984年11月11日”,下列对“生日”的正确赋值方式是___。 year =984; month=11; day=11 birth.year =984; birth.month=11; birth.day=11 s.year =984; s.month=11; s.day=11 s.birth.year =984; s.birth.month=11; s.birth.day=11 10.2 当说明一个结构体变量是系统分配给它的内存是___。 各成员所需内存的总和 结构体中第一个成员所需内存量 成员中占内存量最大者所需的容量 结构中最后一个成员所需内存量 10.3 以下对结构体类型变量的定义中不正确的是___。 #define STUDENT struct student STUDENT { int num; float age; }std1; struct student { int nu

文档评论(0)

1亿VIP精品文档

相关文档