首页 > 建筑规划> 注册城乡规划师
题目内容 (请给出正确答案)
[单选题]

#include <stdio.h>void fun(int a[], int n){ int i,t;for(i=0;i<n/2;i++) { t=a[i]; a[i]=a[n-1-i]; a[n-1-i]=t; }}main(){ int k[10]={1,2,3,4,5,6,7,8,9,10},i;fun(k,5);for(i=2;i<8;i++) printf("%d",k[i]);printf("\n");}程序的运行结果()。

A.345678

B.876543

C.1098765

D.321678

答案
收藏

D、321678

如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“#include <stdio.h>void fun(int…”相关的问题
第1题
有以下程序: #include<stdio.h> int abe(int u,int v); main { int a=24,b一16,c; c=abc(a

有以下程序: #include<stdio.h> int abe(int u,int v); main { int a=24,b一16,c; c=abc(a,b); printf("%d\n",c); } int abc(int u,int v) { int w; while(v) {w=u%v;u=v;v=w;) return; } 输出结果是()。

A.6

B.7

C.8

D.9

点击查看答案
第2题
有以下程序#include<stdio.h>#include<string.h>main(){char a[10]=”abcd”;prinff(“

有以下程序

#include<stdio.h>

#include<string.h>

main()

{char a[10]=”abcd”;

prinff(“%d,%d\n”,strlen(A),sizeof(A));

}

程序运行后的输出结果是

A.7,4

B.4,10

C.8,8

D.10,lO

点击查看答案
第3题
有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a;

有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a; else return(fun(-a,-b)); } main() { printf("%d\n",fun(4,2)); } 程序的运行结果是______。

A.1

B.2

C.3

D.4

点击查看答案
第4题
以下程序:#include<stdio.h>#include<string.h>main(){char str[]="abcd\n\123\xab";printf("%d"

以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是()。

A.10

B.9

C.7

D.14

点击查看答案
第5题
有以下程序 #include <stdio.h>main(){ char a,b,c;b=’1’; c=’A’; for(a=0; a<6; a++)

有以下程序

#include <stdio.h>

main()

{ char a,b,c;

b=’1’; c=’A’;

for(a=0; a<6; a++)

{ if (a%2) putchar(b+a);

else putchar(c+a);

}

}

程序运行后的输出结果是

A) 1B3D5F

B) ABCDEF

C) A2C4E6

D) 123456

点击查看答案
第6题
以下程序的输出结果是()。#include<stdio.h>main(){inta=1,b=2,c=3;printf(“%d”,c>b>a);}

A.2

B.1

C.0

D.3

点击查看答案
第7题
以下程序的输出结果是【】。include<stdio.h> main () int a[3][3] ={{1,2,9},{3,4,8},{5,6,7} } ,

以下程序的输出结果是【 】。

include <stdio.h>

main ()

int a[3][3] ={{1,2,9},{3,4,8},{5,6,7} } ,i,s=0;

for(i=0;i<3;i++) s+ =a[i][i] + a[i][3-i-1];

pfintf("% d \n" ,s);

点击查看答案
第8题
有以下程序:#include<stdio.h>main(){int a [10]={1,2,3,4,5,6,7,8,9,10},*p=&a[3], *q=p+2;

有以下程序: #include <stdio.h> main() { int a [10]={1,2,3,4,5,6,7,8,9,10},*p=&a[3], *q=p+2; prinff("%d\n";*p+*q); } 程序运行后的输出结果是()。

A.16

B.10

C.8

D.6

点击查看答案
第9题
#include”stdio.h”main(){ int a =3,b=6,s;char ch=’B’;s=a-b;ch+=2;printf(“s=%d,ch=%c/n”,s,

#include”stdio.h”

main()

{ int a =3,b=6,s;

char ch=’B’;

s=a-b;

ch+=2;

printf(“s=%d,ch=%c/n”,s,ch);

}

程序结果:()。

点击查看答案
第10题
以下程序运行后的输出结果是【 】。 include <stdio.h> main() { int a=1,b=3,c=5;

以下程序运行后的输出结果是【 】。 include <stdio.h> main() { int a=1,b=3,c=5; if (c=a+b) printf("yes\n"); else printf("no\n"); }

点击查看答案
第11题
有以下程序#include<stdio.h>#include<string.h>main(){char str[][20]={“Qne*World

有以下程序

#include<stdio.h>

#include<string.h>

main()

{char str[][20]={“Qne*World”,“one*Dream!”},*P=str[1 ].

prinff(“%d,”,strlen(p));printf(“%s\n”,P); ’

}

程序运行后的输出结果是

A.9,One*World S)

B.9,One*Dream!

C.10,One*Dream!

D.10,One*World

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