以下结构体的定义语句中,正确的是()
A: structstudent{intnum;charname[10];intage;};stu;
B: struct{intnum;charname[10];intage;}student;structstudentstu;
C: structstudent{intnum;charname[10];intage;}stu;
D: structstudent{intnum;charname[10];intage;};studentstu;
A: structstudent{intnum;charname[10];intage;};stu;
B: struct{intnum;charname[10];intage;}student;structstudentstu;
C: structstudent{intnum;charname[10];intage;}stu;
D: structstudent{intnum;charname[10];intage;};studentstu;
举一反三
- 对结构体类型变量定义不正确的是() A: #defineSTUDENTstructstrdentSTRDENT{charname;intnum;}std; B: structstudent{charname;intnum;}stu; C: struct{charname;intnum;}std; D: struct{charname;intnum;}student;structstudentstu;
- 以下定义结构体变量的语句中错误的是()。 A: struct{intnum;charname[20];}s; B: structstudent{intnum;charname[20];}s; C: structstudent{intnum;charname[20];};students; D: structstudent{intnum;charname[20];};structstudents;
- 若STUDENTstudent1,student2;(student1,student2为结构体变量)为正确定义,那么在此之前应做()定义。 A: struct{charname[20];intnum;}STUDENT; B: structSTUDENT{charname[20];intnum;}; C: typedefstruct{charname[20];intnum;}STUDENT; D: typedefstructSTUDENT{charname[20];intnum;};
- 若定义结构体类型变量student,以下各项对结构体变量成员引用错误的是()。structstud_type{intnum;charname[10];intage;floatscore;}student;
- 若structstudent {intnum; intage; }stu[3]={{1001,18},{1002,19},{1003,20}}; 则下面语句中引用非法的是()