首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

若有以下程序段:struct st{int n;int*m;};int a=2,b=3,c=5;struct st s[3]=({101,&a},{102,&

若有以下程序段: 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++)->m

C.(*p).m

D.*(p)->m

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“若有以下程序段:struct st{int n;int*m;…”相关的问题
第1题
有以下程序段:struct st{ int x; int * y; } * pt;int a[] = {1,2} ,b[] = {3,4};struct st c[2]

有以下程序段: struct st { int x; int * y; } * pt; int a[] = {1,2} ,b[] = {3,4}; struct st c[2] = {10,a,20,b}; pt=c; 以下选项中表达式的值为11的是()。

A.*pt->y

B.pt->x

C.++pt->x

D.(pt++)->x

点击查看答案
第2题
若有如下说明,则______的叙述是正确的。struct st{ int a;int b[2];}a;A.结构体变量a与结构体成员

若有如下说明,则______的叙述是正确的。 struct st { int a; int b[2]; }a;

A.结构体变量a与结构体成员a同名,定义是非法的

B.程序只在执行到该定义时才为结构体st分配存储单元

C.程序运行时为结构体st分配6个字节存储单元

D.类型名struct st可以通过extern关键字提前引用(即引用在前,说明在后)

点击查看答案
第3题
若有以下定义和语句struct a{int n,m;};struct a st[3]={{1,20},{2,19},{3,21}};struct a*p=st;

若有以下定义和语句 struct a { int n,m;}; struct a st[3]={{1,20},{2,19},{3,21}}; struct a*p=st; 则以下错误的引用是

A.(p++)->n;

B.st[0].n;

C.(*p).n;

D.p=&st.m;

点击查看答案
第4题
若有以下定义和语句 struct a{ int n,m;}; struct a st[3]={{2,3},{4,5},{6,7}}; struct a*p=st;则以下错误的引用是

A.(p++)->n;

B.st[0].n;

C.(*p).n;

D.P=&st.m,

点击查看答案
第5题
若有如下说明,则_______的叙述是正确的。 struct st { int a; int b[2]; }a;

A.结构体变量a与结构体成员a同名,定义是非法的

B.程序只在执行到该定义时才为结构体st分配存储单元

C.程序运行时为结构体st分配6个字节存储单元

D.类型名struct st可以通过extern关键字提前引用(即引用在前,说明在后)

点击查看答案
第6题
有下列程序段:struct St{int x;int *y;)*pt;int a[]={1,2),b[]={3,4);struct st c[2]={10,a,20,b

有下列程序段: struct St {int x;int *y;)*pt; int a[]={1,2),b[]={3,4); struct st c[2]={10,a,20,b); pt=c; 下列选项中表达式的值为11的是()。

A.*pt- >y

B.pt- >x

C.+ +pt- >x

D.(pt+ +)->x

点击查看答案
第7题
有下列程序段: struct st {int x;int *y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是()。

A.*pt->y

B.pt->x

C.++pt->x

D.(pt++)->X

点击查看答案
第8题
有下列程序段: struct st {intx;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是()。

A.*pt->y

B.pt->x

C.++pt->x

D.(pt++)->x

点击查看答案
第9题
若有定义:char *st="how are you";下列程序段中正确的是()。A.char a[11], *p; strcpy(p=a+1,&

若有定义:char *st="how are you";下列程序段中正确的是()。

A.char a[11], *p; strcpy(p=a+1,&st[4]);

B.char a[11]; strcpy(a, st);

C.char a[11]; strcpy(a, st);

D.char a[], *p; strcpy(p=&a[1],st+2);

点击查看答案
第10题
若有定义:char*st="how are you";下列程序段中正确的是A.char a[11],*p;strcpy(p=a+1,&st[4]

若有定义:char*st="how are you";下列程序段中正确的是

A.char a[11],*p;strcpy(p=a+1,&st[4]);

B.char a[11];strcpy(a,st);

C.char a[11];strcpy(a,st);

D.char a[],*p;strcpy(p=&a[1],st+2);

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改