网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

设有以下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


参考答案

更多 “ 设有以下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)->aB.*p->bC.*(p++)->bD.*(++p)->b ” 相关考题
考题 设有说明struct DATE { int year;int month; int day;};请写出一条定义语句,该语句定义 d 为上述结构体 类型 变量,并同时为其成员 year 、 month 、 day 依次赋初值 2006 、 10 、 1 : 【 19 】 。

考题 ( 38 )有以下定义和语句struct workers{ int num;char name[20];char c;struct{ int day; int month; int year; } s;} ;struct workers w,*pw;pw = w;能给 w 中 year 成员赋 1980 的语句是A ) *pw.year = 198O;B ) w.year=1980;C ) pw-year=1980;D ) w.s.year=1980;

考题 有以下程序段struct st{int x;int *y;)*pt;int a[]={l,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为 11 的是A)*pt-yB)pt-xC)++pt-xD)(pt++)-x

考题 设有说明struct DATE{int year;int month; int day;};请写出一条定义语句,该语句定义d为上述结构体变量,并同时为其成员year、month、day 依次赋初值2006、10、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;

考题 若有以下说明和语句: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

考题 下面结构体的定义语句中,错误的是( )。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;

考题 下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB 下面结构体的定义语句中,错误的是( )。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;

考题 设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。

考题 设有C语言变量说明“static int a[][2]={{1,2),(3,4}};int *pa,(*pb)[2];”,则执行语句“pa=pb=”,则执行语句“pa=pb=a[0][0];”后,(*(pa+1))的值为(31)。A.2B.3C.a[0][1]D.a[1][0]

考题 若有以下程序段: 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).mB.*(p+1)->mC.*(p++)->nD.(p++)(*m)

考题 设有以下说明和定义: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____

考题 若有以下说明和语句: struct st{int n;char*ch;} struct st a[3]={5,"abc"7,"def",9",ghk"),*p=a; 则值为6的表达式是______。A.p++->nB.p->n++C.(*p).n++D.#NAME?

考题 设有以下说明和定义:includeVoid main() {typedef union{long i; int k[5]; char 设有以下说明和定义:#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.26B.52C.18D.8

考题 若有以下说明和语句: struct st{int n;char * ch;}; struct st a[3]={5,"abc",7,"def",9,"ghk"},*p=a; 则值为6的表达式是 ______。A.p++->nB.p->n++C.(*p).n++D.++p->n

考题 下面结构体的定义语句中,错误的是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;

考题 有以下定义和语句,则sizeof(a) 的值是【 】,而sizeof(a,share)的值是【 】struct date{ int day;int mouth;int year;union{int share1;float share2;}share;}a;

考题 有以下定义和语句,则sizeof(a.share)的值是( )。struct date{ unsigned int day;unsigned int mouth;unsigned int year;union{int share1;float share2;}share;}a;

考题 设有以下语句 ( ) 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+ + ->nB.p->n + +C.(* P). n+ +D.+ +p - >n

考题 设有以下说明和定义: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.26B.30C.18D.8

考题 下面结构体的定义语句中,错误的是( )。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;

考题 设有以下语句: 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++->nB.p->n++C.(*p).n++D.++p->n

考题 设有以下C语言说明语句。 struct { int x,y;} s[2]={{1,2),{3,4}),*p=s,*q=s; 则表达式++p->x和表达式(++q)->x的值分别为(34)。A.1、1B.1、3C.2、3D.3、3

考题 设有说明语句int k,i=5,j=10;则表达式k=(++i)*(j--)的值是 ( )A.50B.60C.45D.55

考题 若已定义   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的值是  ②  。

考题 设有说明语句:int k=1,m=2;double d=7.3;,以下表达式中错误的是()。A、k=m=kB、k++C、k%(int)dD、dmk

考题 单选题设有说明语句:int k=1,m=2;double d=7.3;,以下表达式中错误的是()。A k=m=kB k++C k%(int)dD dmk