题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-16 19:52:26

[单项选择]以下程序的输出是( )。
struct st

int x;int *y;

*p;
int dt[4]=10,20,30,40;
struct st aa[4]= 50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3];
main( )

p=aa;
cout<<++p->x;
cout<<(++p)->x;
cout<<++(*p->y);

A. 10 20 20
B. 50 60 21
C. 51 60 21
D. 60 70 31

更多"以下程序的输出是( )。 struct st in"的相关试题:

[单项选择]若有以下程序段
struct st int n;struct st*next;;
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
[单项选择]以下程序的输出是( )。
struct st

int x;int *y;

*p;
int dt[4]=10,20,30,40;
struct st aa[4]= 50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3];
main( )

p=aa;
cout<<++p->x;
cout<<(++p)->x;
cout<<++(*p->y);

A. 10 20 20
B. 50 60 21
C. 51 60 21
D. 60 70 31
[单项选择]有以下程序
#include<stdlib.h>
struct NODE
int num;struct NODE*next;
main( )
struct NODE *P,*q,*r;
p=(struct NODE *)malloc(sizeof(struct NODE));
q=(struct NODE *)malloc(sizeof(struet NODE));
r=(struct NODE*)malloc(sizeof(struct NODE)):
p->num=10;q->num=20;r->num=30;
p->next=q;q->next=r;
printf("%d/n",p->num+q->next->num):

程序运行后的输出结果是 ( )
A. 10
B. 20
C. 30
D. 40
[单项选择]以下程序的输出是( )。
struct st

int x;int *y;

*p;
int dt[4]=10,20,30,40;
struct st aa[4]=50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],;
main( )

p=aa;
cout<+<+(p->x);

A. 10
B. 11
C. 51
D. 60
[单项选择]以下程序的输出结果是
#include<stdio.h>
struct st
int x;int *y;*p;
int dt[4]=10,20,30,40;
struct st aa[4]=50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],;
main( )
p=aa;
printf("%d/n",++(p->x));
A. 10
B. 11
C. 51
D. 60
[单项选择]下面程序的输出结果为 ( )
struct st
int x;
int *y;
*p;
int dt[4]=10,20,30,40;
struct st aa[4]=50,&dt[0],60,&dt[1],
70,&dt[2],80,&dt[3];
main( )
p=aa;
printf("%d/n",++p->x);
printf("%d/n",(++p)->x);
printf("%d/n",++(*p->y));

A. 10
B. 50
C. 51
D. 60
[单项选择]下面程序的输出结果为( )。
struct st int x;int *y;*p;
int dt[4]=10,20,30,40);
struct st aa[4]=50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3];
main( )
p=aa;
printf("%d/n",++p->x);
printf("%d|n",(++p)->x);
printf("%d/n",++(*p->y));

A. 10
B. 50
C. 51
D. 60
[单项选择]若有以下程序段:
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
[填空题]以下程序运行后的输出结果是 【17】
struct NODE
int k;
struct NODE *link;
;
main( )
struct NODE m[5],*p=m,*p=m,*q=m+4;
int i=0;
while(p!=q)
p->k=++i; p++
q->k=i++; q--;

q->k=i;
for(i=0;i<5;i++)
printf("%d",m[i].k);
ptintf("/n");

[填空题]有以下程序:
#include <stdio.h>
typedef struct
int num; double s;REC;
void fun1(REC x)x.num=23; x.s=88.5;
main( )
REC a=16,90.0;
fun1(a);
printf("%d/n",a.num);

程序运行后输出的结果是______。
[简答题]以下程序的输出结果是______。
struct HAR
int x,y;struct HAR *p;h[2]
main( )
h[0].x=1;h[0].y=2
h[1].x=3;h[1].y=4
h[0].p=&h[1];h[1].p=h
printf("%d%d/n",( )h[0].p)->x,(h[1].p->y);

[单项选择]以下程序的输出结果是______。
struct HAR
int x,y;struct HAR *p; h[2];
main( )
h[0].x=1;h[0].y=2;
h[1].x=3;h[1].y=4;
h[0].p=&h[1];h[1].p=h;
printf("%d%d/n",(h[0].p)->x,(h[1].p)->y);

A. 12
B. 23
C. 14
D. 32
[填空题]以下程序运行后输出的结果是______。
struct NODE
int k;
struct NODE *link;

void main( )
struct NODE m[5],*p=m,*q=m+4;
int i=0;
while(p!=q)
p->k=++i;p++;
q->k=i++;q--;

q->k=i;
for(i=0;i<5;i++)prinf("%d",m[i].k);
printf("n");

[填空题]以下程序运行后的输出结果是______。
struct NODE
int k;
struct NODE *link;
;
main( )
struct NODE m[5],*pm,*q=m+4;
int i=0;
while(P!=q)
p->k=++i;p++;
q->k=i++;q--;

q->k=i;
for(i=0;i<5;i++)printf("%d",m[i].k);
printf("/n");

[填空题]以下程序运行后的输出结果是______。
struct NODE
int hum;struct NODE *next;

main( )
structNODE s[3]=1,’/0’,2,’/0’,3,’/0’, *p, *q, *r;
int sum=0;
s[0].next=s+1;s[1].next=s+2;s[2].next=s;
p=S;q=p->next;r=q->next;
sum+=q=>next->num;sum+=r->next->next->num;
printf("%d/n",sum);

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码