第1页共7页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第1页共7页第十章结构体与共用体一、选择题1
在说明一个结构体变量时系统分配给它的存储空间是
(0级)A)该结构体中第一个成员所需存储空间B)该结构体中最后一个成员所需存储空间C)该结构体中占用最大存储空间的成员所需存储空间D)该结构体中所有成员所需存储空间的总和2
若有以下说明和语句:structworker{intno;charname;}work,p=&work;﹡﹡则以下引用方式不正确的是
(1级)A)work.noB)(p)﹡.noC)p->noD)work->no3
有如下定义:structdate{intyear,month,day;};structworklist{charname[20];charsex;structdatebirthday;}person;对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是
(1级)A)year=1958B)birthday.year=1958C)person.birthday.year=1958D)person.year=19584
以下对结构体类型变量的定义中不正确的是
(1级)A)#defineSTUDENTstructstudentB)structstudentSTUDENT{intnum;{intnum;floatage;floatage;}std1;}std1;C)structD)struct{intnum;{intnum;floatage;floatage;}student;}std1;structstudentstd1;5
设有以下说明语句structstu{inta;floatb;}stutype;则下面的叙述不正确的是
(1级)A)struct是结构体类型的关键字B)structstu是用户定义的结构体类型C)