下列对结构类型变量的定义中不正确的是()
A: struct{longintnum;charname[20];charsex;charaddr[20];}student;structstudentstd1;
B: #defineSTUDENT structstudentSTUDENT{longintnum;charname[20];charsex;charaddr[20];}std1;
C: struct{longintnum;charname[20];charsex;charaddr[20];}std1;
D: struct student{longintnum;charname[20];charsex;charaddr[20];}std1;
A: struct{longintnum;charname[20];charsex;charaddr[20];}student;structstudentstd1;
B: #defineSTUDENT structstudentSTUDENT{longintnum;charname[20];charsex;charaddr[20];}std1;
C: struct{longintnum;charname[20];charsex;charaddr[20];}std1;
D: struct student{longintnum;charname[20];charsex;charaddr[20];}std1;
举一反三
- 对结构体类型变量定义不正确的是() A: #defineSTUDENTstructstrdentSTRDENT{charname;intnum;}std; B: structstudent{charname;intnum;}stu; C: struct{charname;intnum;}std; D: struct{charname;intnum;}student;structstudentstu;
- 若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;};
- 有如下定义:structdate{intyear;intmonth;intday;};struct{charname[20];charsex;structdatebirthday;}person;下面正确的赋值语句是()。
- 以下定义结构体变量的语句中错误的是()。 A: struct{intnum;charname[20];}s; B: structstudent{intnum;charname[20];}s; C: structstudent{intnum;charname[20];};students; D: structstudent{intnum;charname[20];};structstudents;
- 以下对结构类型变量的定义中错误的是( ) A: B: define STUDENT struct student STUDENT {int num;float age;} std1; C: struct {int num; float age; } std1; struct student std1; D: struct student {int num; float age; } std1; E: struct {int num; float age; } std1;