若有以下说明和语句 struct student {int age; int num; }std, *p; p=&std; 则以下对结构体变量std
若有以下说明和语句
struct student
{int age;
int num;
}std, *p;
p=&std;
则以下对结构体变量std中成员age的引用方式不正确的是( )。
A.std.age B.p->age C.(*p).age D.*p.age
若有以下说明和语句
struct student
{int age;
int num;
}std, *p;
p=&std;
则以下对结构体变量std中成员age的引用方式不正确的是( )。
A.std.age B.p->age C.(*p).age D.*p.age
第1题
若有以下定义的语句: struct student { int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() { struct student *p; p=stu; …} 则以下不正确的引用是()。
A.(p++)->num
B.p++
C.(*p).num
D.P=&stu.age.
第2题
若有以下定义的语句
struct student
{ int age;
int num; };
struct student stu[3]={{1001,20},{1002,19},{1003,21}};
main()
{ struct student *p;
p=stu;
… }
则以下不正确的引用是
A.(p++)->num
B.p++
C.(*p).num
D.P=&stu.age.
第3题
若有以下语句,则下面表达式的值为1002的是( )。
struct student
{int age;
int num;
};
struct student stu[3]={{1001,20},{1002,19},{1003,21}};
struct student *p;
p=stu;
A.(p++)->num B.(p++)->age C.(*p).num D.(*++p).age
第4题
有以下说明和定义语句:
struct student
{int age;char num[8];);
struct student stu[3]={{20,"200401"},(21,"200402"),(19,"200403"}};
struct student*p=stu;
以下选项中引用结构体变量成员的表达式错误的是( )。
(A)(p++)->num (B)p->num (C)(*p).num (D)stu[3].age
第5题
A.year=1958;
B.birthday.year=1958;
C.person.birthday.year=1958;
D.person.year=1958;
第6题
A.structstudentstu[2]={1,"zhangsan",2,"lisi"}
B. struct student stu[2]={1, "zhangsan",2,"li si"}
C. struct student stu[2]={{1,"zhangsan"},{2,"li si"}};
D. struct stu[]={{1,"zhangsan"},{2,"li si"}}
第7题
A.class[0]->age + class[1]->age+ class[2]->age
B.class[1].name[5]
C.person[1].name[5]
D.clase->name[5]
第8题
A.10,20,20
B.50,60,21
C.51,60,21
D.60,70,31
第9题
若有以下定义和语句,sizeof(a)的值是【 】,sizeof(a.share)的值是【 】。 struct date { int day; int month; int year; union { int share1; float share2; }share; }a;
第10题
若有以下语句typedefstructS{intg;charh;}T;以下叙述中正确的是
A.可用S定义结构体变量
B.S是struct类型的变量
C.T是structS类型的变量
D.可用T定义结构体变量