题目内容

Lesson 6 模拟通话4-1

查看答案
更多问题

Lesson 6 模拟通话4-2

已知学生记录描述为: struct student { int no; char name[20]; char sex; struct { int year; int month; int day; }birth; }; struct student s; 设变量s中的“生日”是“1984年11月11日”,下列对“生日”的正确赋值方式是( )。

A. year=1984;month=11;day=11;
B. birth.year=1984;birth.month=11;birth.day=11;
C. s.year=1984;s.month=11;s.day=11;
D. s.birth.year=1984;s.birth.month=11;s.birth.day=11;

当定义一个结构体变量时系统分配给它的内存是( )。

A. 各成员所需内存的总和
B. 结构中第一个成员所需内存量
C. 成员中占内存量最大者所需的容量
D. 结构体中最后一个成员所需内存量

设有以下说明语句:struct stu{ int a; float b; } stutype;则以下叙述中不正确的是( )。

A. struct是结构体类型的关键字
B. struct stu是用户定义的结构体类型
C. stutype是用户定义的结构体类型名
D. a和b都是结构体成员名

答案查题题库