设有以下C语言说明语句,则值为210的表达式是(33)。 struct s { int a;int *b;}; Int x0[]={110,120},x1[]={210,220}; struct s x[]={{100},{200}},*p=x; x[0].b=x0;x[1].b=x1;
A.(++p)->a
B.*p->b
C.*(p++)->b
D.*(++p)->b
第1题:
下面结构体的定义语句中,错误的是
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;
第2题:
下面结构体的定义语句中,错误的是( )。
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;
第3题:
设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。
第4题:
若有以下程序段: struct st {int n; int*m: }; int a=2,b=3,c=5; struct st s[3]=({101,&a},{102,&c},{103,&B)}; main() {struct st*p; p=s; } 则以下表达式中值为5的是( )。
A.(*p).m
B.*(p+1)->m
C.*(p++)->n
D.(p++)(*m)
第5题:
若有以下说明和语句: 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?
第6题:
若有以下说明和语句: 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.++p->n
第7题:
有以下定义和语句,则sizeof(a) 的值是【 】,而sizeof(a,share)的值是【 】
struct date
{ int day;
int mouth;
int year;
union{int share1;
float share2;
}share;
}a;
第8题:
设有以下语句 ( ) struct st {int n;struct st * next;}; static struct st a [3]={5,&a [1],7,&a[2],9,'\0'},*p; p=&a[0] 则表达式( )的值是6。
A.p+ + ->n
B.p->n + +
C.(* P). n+ +
D.+ +p - >n
第9题:
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int Y;int z;}struct ord a;
B.struct ord{int x;im Y;im z;};struct ord a;
C.struct ord{int x;int Y;int Z;}a;
D.struct{int x;int Y;int z;}a;
第10题:
设有以下C语言说明语句。 struct { int x,y;} s[2]={{1,2),{3,4}),*p=s,*q=s; 则表达式++p->x和表达式(++q)->x的值分别为(34)。
A.1、1
B.1、3
C.2、3
D.3、3
第11题:
若已定义 struct num{ int a; int b; float f; } n={1,3,5.0}; struct num *p=&n; 则表达式p->b/n.a*++p->b的值是 ① ,表达式(*p).a+p->f的值是 ② 。
第12题:
k>=m=k
k++
k%(int)d
d>m>k
第13题:
若有以下说明和语句:sturct 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)++p->n
第14题:
下面结构体的定义语句中,错误的是( )。
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;
第15题:
设有C语言变量说明“static int a[][2]={{1,2),(3,4}};int *pa,(*pb)[2];”,则执行语句“pa=pb=&a[0][0];”后,(*(pa+1))的值为(31)。
A.2
B.3
C.&a[0][1]
D.&a[1][0]
第16题:
设有以下说明和定义:
typedef union {long i; int k[5]; char c;} DATE;
struct data { int cat; DATE cow; double dog;} too;
DATE max;
则语句 printf("%d",sizeof(struct date)+sizeof(max));的执行结果是:___52____
第17题:
设有以下说明和定义:#include<iostream. h>Void main() {typedef union{long i; int k[5]; char c;}DATE;struct date{iNt cat; DATE cow; double. dog;}too;DATE max;则下列语句的执行结果是( )。cout<<(sizeof(struct date)+sizeof(max))<<end1;}
A.26
B.52
C.18
D.8
第18题:
下面结构体的定义语句中,错误的是
A.struct ord{int x;int y;int z;};struet ord a;
B.atruet ord{int x;int y;int z;}struct ord a;
C.struet ord{int x;int y;int z;}a;
D.struct{int x;int y;int z;)a;
第19题:
有以下定义和语句,则sizeof(a.share)的值是( )。
struct date
{ unsigned int day;
unsigned int mouth;
unsigned int year;
union{int share1;
float share2;
}share;
}a;
第20题:
设有以下说明和定义:typedef union{ long i;int k[5];char c; } DATE;struct date{ int cat;DATE cow;double dog; }too;DATE max;则下列语句的执行结果是______。printf("%d",sizeof (struct date) +sizeof(max));
A.26
B.30
C.18
D.8
第21题:
设有以下语句: struct st{int n;struct st*next;}; static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p; p=&a[0];则表达式的值是6的为______。
A.p++->n
B.p->n++
C.(*p).n++
D.++p->n
第22题:
设有说明语句int k,i=5,j=10;则表达式k=(++i)*(j--)的值是 ( )
A.50
B.60
C.45
D.55
第23题:
设有说明语句:int k=1,m=2;double d=7.3;,以下表达式中错误的是()。