设有以下说明structstudent{intnum;charsex;intage;}a1,a2;则下面的用法中不正确的是().
举一反三
- 以下结构体的定义语句中,正确的是() 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;
- 若structstudent {intnum; intage; }stu[3]={{1001,18},{1002,19},{1003,20}}; 则下面语句中引用非法的是()
- 中国大学MOOC: 有以下说明和定义语句,下面各输入语句中错误的是#include<stdio.h>intmain(){structstudent{intage;charsex;charname[8];};structstudentstd;structstudent*p=&std;.......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;charname[9];}则不能正确定义结构体数组并赋初始值的是 A: structstudentstu[]={{1,"zhangsan"},{2,"lisi"}}; B: structstudentstu[2]={1,"zhangsan",2,"lisi"}; C: structstudentstu[2]={{1,"zhangsan"},{2,"lisi"}}; D: structstu[]={{1,"zhangsan"},{2,"lisi"}};