若structstudent
{intnum;
intage;
}stu[3]={{1001,18},{1002,19},{1003,20}};
则下面语句中引用非法的是()
{intnum;
intage;
}stu[3]={{1001,18},{1002,19},{1003,20}};
则下面语句中引用非法的是()
stu[3].num
举一反三
- 以下结构体的定义语句中,正确的是() 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;
- 若能使程序运行后的输出结果如下: 201501 则空白处填写的表达式或语句应该是 #include structstudent { intage; charnum[8]; }; intmain() { structstudentstu[3]={{20,"201501"},{21,"201502"},{19,"201503"}}; structstudent*p=stu; ____________________ return0; }
- 以下定义结构体变量的语句中错误的是()。 A: struct{intnum;charname[20];}s; B: structstudent{intnum;charname[20];}s; C: structstudent{intnum;charname[20];};students; D: structstudent{intnum;charname[20];};structstudents;
- 若有以下定义语句:structstudent{intnum,age;};structstudentstu[3]={{101,20},{102,19},{103,18}},*p=stu;则以下错误的引用是()
- 有以下说明和定义语句 structstudent {int age; char num[8];}; structstudentstu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; structstudent *p=stu; 以下选项中引用结构体变量成员的表达式错误的是______。
内容
- 0
设有以下说明structstudent{intnum;charsex;intage;}a1,a2;则下面的用法中不正确的是().
- 1
若有以下说明和定义语句,则下面引用形式中不正确的是 ( )。 struct student { int age; int num; }; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; struct student *p; p=stu;
- 2
中国大学MOOC: 有以下说明和定义语句,下面各输入语句中错误的是#include<stdio.h>intmain(){structstudent{intage;charsex;charname[8];};structstudentstd;structstudent*p=&std;.......return0;}
- 3
若有以下定义和语句: struct student {int num ;int age;}; struct student stu[3]={{l001,20},{1002,19},{1003,2l}}; main() {struct student *p;p=stu; ... } 则下列引用中不正确的是
- 4
对结构体类型变量定义不正确的是() A: #defineSTUDENTstructstrdentSTRDENT{charname;intnum;}std; B: structstudent{charname;intnum;}stu; C: struct{charname;intnum;}std; D: struct{charname;intnum;}student;structstudentstu;