std.age
*p.age
(*p).age
p->age
第1题:
若有以下定义的语句 struct student {int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() {stmct student *p; p=stu; …} 则以下不正确的引用是
A.(p++)->num
B.p++
C.(*p).num
D.P=&stu.age.
第2题:
若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。
stmct st
{ char a[15];
int b;
double c;
};
printf("%d",sizeof(struct st));
A.15
B.8
C.25
D.2
第3题:
下面结构体的定义语句中,错误的是
A)struct ord {int x;int y;int z;}; struct ord a;
B)struct ord {int x;int y;int z;} struct ord a;
C)struct ord {int x;int y;int z;} a;
D)struct {int x;int y;int z;} a;
第4题:
若有以下说明和语句: struct st{int n;char*ch;} struct st a[3]={5,"abc"7,"def",9",ghk"),*p=a; 则值为6的表达式是______。
A.p++->n
B.p->n++
C.(*p).n++
D.#NAME?
第5题:
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int Y;int Z;};struet ord a;
B.struct ord{int x;int y;int Z;}struct ord a;
C.struct ord{int X;int Y;int Z;}a;
D.struct{int X;int y;int Z;}a;
第6题:
若有结构体定义:
struct stu {int num;
char sex;
int age;
}a1,a2;
则下列语句中错误的是( )。
A.printf("%d%c,%d",a1);
B.a2.age=a1.age;
C.a1.age++;
D.a1.num=5;
第7题:
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int y;int z;};struct ord a;
B.struct ord{int x;int y;int z;};ord a;
C.struct ord{int x;int y;int z;}a;
D.struct{int x;int y;int z;}a;
第8题:
有以下说明和定义语句 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
第9题:
若有以下定义的语句: 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.
第10题:
若有结构体定义:
struct stu{int num;
char sex;
int age;
}al,a2;
则下列语句中错误的是( )。
A.printf("%d,%C,%d",a1);
B.a2.age=a1.age;
C.a1.age++;
D.a1.num=5;