C语言面试题及答案:结构体使用.doc

C语言面试题及答案:结构体使用

1.以下关于结构体的定义,正确的是()(5分)

A.structstudent{intid;floatscore;};

B.structstudent{intid;floatscore;}student1;

C.struct{intid;floatscore;}student1;

D.以上都是

2.若有结构体定义structpoint{intx;inty;};要定义一个结构体变量p,且初始化其x为10,y为20,以下正确的是()(5分)

A.structpointp={10,20};

B.

文档评论(0)

1亿VIP精品文档

相关文档