有以下说明语句: struct a{char x; double y; }ptype; 则下列选项中错误的
A.a是用户定义的结构体名
B.struct a是用户定义的结构类型
C.ptype是用户定义的结构类型名
D.x和Y都是结构成员名
A.a是用户定义的结构体名
B.struct a是用户定义的结构类型
C.ptype是用户定义的结构类型名
D.x和Y都是结构成员名
第1题
设有以下说明语句
typedef struct
{ int n;
char ch[8];
}PER;
则下面叙述中正确的是( )。
A.PER是结构体变量名
B.PER是结构体类型名
C.typedef struct是结构体类型
D.struct是结构体类型名
第2题
有以下说明和定义语句:
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
第4题
第5题
A.a,next=q;
B.p.next=&b;
C.p->next=&b;
D.(*p).next=q;
第6题
设有以下说明语句,则下面的叙述中不正确的是( )。
struct ex
(int x;float y;char z; )example;
(A)struct结构体类型的关键字 (B)example是结构体类型名
(C)x,y,z都是结构体成员名 (D)struct ex是结构体类型
第7题
A.year=1958;
B.birthday.year=1958;
C.person.birthday.year=1958;
D.person.year=1958;
第8题
若有以下说明和语句
struct student
{int age;
int num;
}std, *p;
p=&std;
则以下对结构体变量std中成员age的引用方式不正确的是( )。
A.std.age B.p->age C.(*p).age D.*p.age
第9题
A.struct是结构体类型的关键字
B.example是结构体类型名
C.x,y,z都是结构体成员名
D.struct ex是结构体类型
第10题
设有如下的说明和定义struct{inta;char*s;)x,*p=&x;x.a=4;x.S=hello;则以下叙述中正确的是
A.语句++p->a;的效果是使P增1
B.(p++)->a与p++->a都是合语法的表达式,但二者不等价
C.语句*p->s++;等价于(*p)->s++;
D.语句++p->a;的效果是使成员a增1