设有以下说明语句structstu{inta;floatb;}stutype;则下列叙述不正确的是()。
A.struct是结构体类型的关键字
B.structstu是用户定义的结构体类型
C.stutype是用户定义的结构体类型名
D.a和b都是结构体成员名
A.struct是结构体类型的关键字
B.structstu是用户定义的结构体类型
C.stutype是用户定义的结构体类型名
D.a和b都是结构体成员名
第1题
设有以下说明语句
typedef struct
{ int n;
char ch[8];
}PER;
则下面叙述中正确的是( )。
A.PER是结构体变量名
B.PER是结构体类型名
C.typedef struct是结构体类型
D.struct是结构体类型名
第2题
设有以下说明语句,则下面的叙述中不正确的是( )。
struct ex
(int x;float y;char z; )example;
(A)struct结构体类型的关键字 (B)example是结构体类型名
(C)x,y,z都是结构体成员名 (D)struct ex是结构体类型
第3题
设有如下的说明和定义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
第4题
A.struct是结构体类型的关键字
B.example是结构体类型名
C.x,y,z都是结构体成员名
D.struct ex是结构体类型
第6题
设有语句char a='\72';则变量a包含的字符个数是( )。
(A)1 (B)2 (C)3 (D)说明不合法
第9题
若有以下程序 structstu{char*name,gender;intscore;); main(){ structstua={NULL,m,290},b; a.name=(char*)malloc(10); strcpy(a.name,Zhao); b=a;b.gender=f;b.score=350; strcpy(b.name,“Qian”); printf(”%s,%c,%d,”,a.name,a.gender,a.score); printf(”%s,%c,%d\n”,b.name,b.gender,b.score);) 则程序的输出结果是
A.Zhao,m,290,Qian,f,350
B.Qian,f,350,Qian,f,350
C.Zhao,m,290,Zhao,f,350
D.Qian,m,290,Qian,f,350
第10题
有以下程序 include<stdio.h> structSTU{charname[9];charsex;intscore[2];}; voidf(structSTUa[]) {structSTUb={zhao,m,85,90); a[1]=b; } main() {structSTUc[2]={{tQian,f,95,92),{.Sun”,m,98,99}}; f(c); printf(%s,%c,%d,%d,,c[0].name,c[01.sex,c[0].score[0],c[0].score[1]); printf(%s,%c,%d,%d\n,,c[1].name,c[1].sex,c[1].score[0],c[1].score[1]); } 程序运行后输出结果是
A.Qian,f,95,92,Sun,m,98,99
B.Zhao,m,85,90,Sun,m,98,99
C.Qian,f,95,92,Zhao,m,85,90
D.Zhao,m,85,90,Qian,f,95,92
第11题
设有以下定义和语句,则*(*(p+2) +1) 的值为______。 int a[3][2]={10,20,30,40,50,60},(*p) [2]; p=a;