题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-07-30 20:51:15

[单项选择]下列程序的输出结果是( )。
#include <stdio.h>
struct abc
int a, b, c, s;;
main( )
struct abc s[2]=1,2,3,4,5,6;
int t;
t=s[0].a+s[1].b;
printf("%d/n",t);

A. 5
B. 6
C. 7
D. 8

更多"下列程序的输出结果是( )。 #include <stdio.h>"的相关试题:

[单项选择]下列程序的输出结果是()。
#include <stdio.h>
struct abc
int a, b, c, s;;
main( )
struct abc s[2]=1,2,3,4,5,6;
int t;
t=s[0].a+s[1].b;
printf("%d/n",t);

A. 5
B. 6
C. 7
D. 8
[单项选择]以下程序的输出结果是
#include<stdio.h>
struct st
i int x;int *y;*p;
int dt[4]=10,20,30,40;
struct st aa[4]=50,&dt[0],60,&dt[0],60,&it[0],60,&dt[0],;
main( )
p=aa;
printf("%d/n",++(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
[单项选择]以下程序的输出结果是( )。
#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
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
struct st
int x,y; data[2]=1,10,2,20;
main( )
struet st *p=data;
printf("%d,",p->y);printf("%d/n",(++p)->x);

A. 10,1
B. 20,1
C. 10,2
D. 20,2
[单项选择]

有以下程序
  #include
  #include
  struct A
  { int a; char b[10]; double c;};
  void f(struct A t);
  main( )
  { struct A a={1001,"ZhangDa",1098.0};
  f(a); printf("%d,%s,%6.1f/n",a.a,a.b,a.c);
  }
  void f(struct A t)
  { t.a=1002; strcpy(t.b,"ChangRong");t.c=1202.0;}
  程序运行后的输出结果是()


A. 1001,zhangDa,1098.0
B. 1002,changRong,1202.0
C. 1001,ehangRong,1098.O
D. 1002,ZhangDa,1202.0
[单项选择]以下程序运行后的输出结果是()
#include<stdio.h>
struct st
int x,y; data[2]=1,10,2,20;
main( )
struet st *p=data;
printf("%d,",p->y);printf("%d/n",(++p)->x);

A. 10,1
B. 20,1
C. 10,2
D. 20,2
[单项选择]下列程序的输出结果是( )。
#include<stdio.h>
main( )
struct st
int y, x,z;

union
long i;
int j;
char k;
un;
printf("%d,%d/n",sizeof(struct st),sizeof(un));

A. 6,2
B. 6,4
C. 8,4 D) 8,6
[单项选择]有以下程序: #include struct STU {char name[10]; int num; }; void f(char *name, int num) { struct STU s[2]={{"SunDan",20044},{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main( ) { struct STU s[2]={{"YangSan",20041},{"LiSiGao",20042}},*p; p=&s[1]; f(p->name,p->num); printf("%s %d/n",p->name,p->num); } 程序运行后的输出结果是______。
A. SunDan 20042
B. SunDan 20044
C. LiSiGuo 20042
D. YangSan 20041
[单项选择]有以下程序 #include struct STU{char name[9]; char sex; int score[2];}; void f(struct STU a[]) { struct STU b = {"Zhao", ’m’, 85, 90}; a[1] = b; } main( ) { struct STU c[2] = {{"Qian", ’f’, 95, 92}, {"Sun", ’m’, 98, 99}}; f(c); printf("%s,%c,%d,%d,", c[0].name, c[0].sex, c[0].score[0], c[0].score[1]); printf("%s,%c,%d,%d,", c[1].name, c[1].sex, c[1].score[0], c[1].score[1]); } 程序运行后输出结果是
A. Zhao,m,85,90,Sun,m,98,99
B. Zhao,m,85,90,Qian,f,95,92
C. Qian,f,95,92,Sun,m,98,99
D. Qian,f,95,92,Zhao,m,85,90
[单项选择]有以下程序 #include #include typedef struct {char name[9]; char sex; int score[2]; } STU; STU f(STU a) { STU b={"Zhao",’m’,85,90}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b. score[i]; return a; } main( ) { STU c={"Qian",’f’,95,92}, d; d=f(c); printf("%s,%c,%d,%d,",d.name, d.sex, d.score[0], d.score[1]); printf("%s,%c,%d,%d/n",c.name, c.sex, c.score[0], c.score[1]); } 程序运行后的输出结果是_______。
A. Zhao,m,85,90,Qian,f,95,92
B. Zhao,m,85,90, Zhao,m,85,90
C. Qian,f,95,92, Qian,f,95,92
D. Qian,f,95,92, Zhao,m,85,90
[单项选择]有以程序
#include
#include
typedef struct char name[9]; char sex; float score[2]; STU;
void f( STU a)
STU b="Zhao",’m’,85.0,90.0; int i;
strcpy(a.name,b.name);
a.sex=b.sex;
for(i=0;i<2;i++) a.score[i]=b.score[i];main( )
STU c="Qian",’f’,95.0,92.0;
f(C); printf("%s,%c,%2.0f,%2.0f/n",c.name,c.sex,c.score[0],c.score[1]);程序的运行结果是______。
A. Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90
[单项选择]#include<stdio.h>
typedef struct abc
int a,b,c;

main( )
struct abe s[2]=1,2,3),4,5,6;
int t=-s[0].a+s[1].b;
printf("%d/n",t);

[单项选择]有以下程序:
#include<stdio.h>
struct tt
int x;struct tt*y;*p;
struct tt a[4]=20,a+1,15,a+2,30,a+3,17,a
main( )
int i;
p=a;
for(i=1;i<=2;i++)printf("%d",p->x);p=P->y;

程序的运行结果是()。
A. 20,30,
B. 30,17
C. 15,30
D. 20,15
[单项选择]下列程序的输出结果是 ( )
struct abc
int a,b,c;;
main( )
struct abc s[2]=1,2,3,4,5,6;
int t;
t=s[0].a+s[1].b;
printf("%d/n",t);

A. 3
B. 4
C. 5
D. 6
[单项选择]下面程序运行后的输出结果是()。
struct abc

int a,b,c;

main( )

struct abc s[2]=1,2,3,4,5,6;
int t=-s[0].a+s[1].b;
printf("%d/n",t);

A. 5
B. 6
C. 7
D. 8
[单项选择]有以下程序:
#include <stdio.h>
#include <strine.h>
struct STU
char name[10];
int hum;
;
void f(char * name,iht num)
struct STU s[2] = "SunDan" ,20044 , " Penghua" ,20045;
num= s[0]. nnm;
strepy(name,s[0], name);main( )
struct STU s[2] = "YangSan" ,20041 , "LiSiGao" ,20042, * P;
p = &s[1]; f(p->name,p->hum);
printf("% s %d /n" ,p-> name,p->num);程序运行后的输出结果是( )。
A) SunDan 20042 B) SunDan 20044
C) LiSiGuo 20042 D) YangSan 20041
[单项选择]有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main( ) {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p; p=&s[1]; f(p->name,p->num); printf("%s%d/n",p->name,p->num); } 程序运行后的输出结果是【 】。
A. SunDan 20042
B. SunDan 20044
C. LiSiGuo 20042
D. YangSan 20041

我来回答:

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

订单号:

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