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

以下程序运行后的输出结果是【 】。 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"); }

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“以下程序运行后的输出结果是【 】。 include <std…”相关的问题
第1题
执行以下程序段后,inta=0;if(!a)printf("1");elseprintf("0");输出结果是()。

A.0

B.1

C.10

D.提示运行错误

点击查看答案
第2题
有以下程序 main() { char ch[]="uvwxyz",*pc; pc=ch;printf("%c\n",*(pc+5)); } 程序运行后的输出结果是

A.z

B.0

C.元素ch[5]的地址

D.字符y的地址

点击查看答案
第3题
有以下程序:main(){ char s[]="Yes\n/No",*ps=s;puts(ps+4);*(ps+4)=0;puts(s);}程序运行后的输

有以下程序: main() { char s[]="Yes\n/No",*ps=s; puts(ps+4); *(ps+4)=0; puts(s); } 程序运行后的输出结果是(选项D中的第一行是空行) ______。

A.n/No Yes /No

B./No Yes Yes

C.n/No /No

D.Yes /No

点击查看答案
第4题
‎阅读以下程序:‎#include‎void main()‎{int x;scanf("%d",&x);if(x--<5)printf("%d", x);else‎printf("%d", x++);}‎程序运行后,如果从键盘上输入5,则输出结果是()。

A.4

B.5

C.3

D.6

点击查看答案
第5题
有以下程序#includevoid main(){int a=16,b=21,m=0;switch(a%3){case 0:m++;break;case 1:m++;switch(b%2){default:m++;case 0:m++;break;}}printf("%d/n",m);}程序运行后的输出结果是()。

A.2

B.1

C.4

D.3

点击查看答案
第6题
有以下程序 #include<stdio.h> main() {char cl,c2; c1=A+8-4 c2=A+8-5; printf("%

有以下程序 #include<stdio.h> main() {char cl,c2; c1=A+8-4 c2=A+8-5; printf("%C,%d\n",cl,c2); } 已知字母A的ASCIl码为65,程序运行后的输出结果是()。

A.E,69

B.D,69

C.E,D

D.输出无定值

点击查看答案
第7题
(21 )有以下程序# include (stdio.h >main (){ int a = l ; b = 2 ;for (; a < 8 ; a++ ) { b

(21 )有以下程序

# include (stdio.h >

main ()

{ int a = l ; b = 2 ;

for (; a < 8 ; a++ ) { b+=a ; a+=2 ; }

printf (" %d , %d \ n ", a , b ) ;

}

程序运行后的输出结果是

A ) 9 , 18

B ) 8 , 11

C ) 7 , 11

D ) 10 , 14

点击查看答案
第8题
‏有以下程序‏#include‏void main()‏{int i,s=0;for(i=1;i<10;i+=2)‎s+=i+1;‎printf("%d/n",s);}‏程序运行后的输出结果是()。

A.数1~10的累加和

B.数1~9的累加和

C.数1~9中的奇数之和

D.数1~10中的偶数之和

点击查看答案
第9题
有以下程序 main() { int i=0,s=0; for(;;) { if(i==3||i==5)continue; if(i==6) break; i++; s+

有以下程序 main() { int i=0,s=0; for(;;) { if(i==3||i==5)continue; if(i==6) break; i++; s+=i; }; printf("%d\n",s); } 程序运行后的输出结果是______。

A.10

B.13

C.21

D.程序进入死循环

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

有以下程序

#include<stdio.h>

#include<string.h>

main()

{char x[]=“STRING”;

x[0]=0;x[1]=’\0’;x[2]=’0’;

printf(”%d%d\n”,sizeof(x),strlen(x));

}

程序运行后的输出结果是()。

A.6 1

B.7 0

C.6 3

D.7 1

点击查看答案
第11题
有以下程序#include<stdio.h>int fun(){static int x=1;x+=1;return x;}main(){int i,s=

有以下程序

#include<stdio.h>

int fun()

{static int x=1;

x+=1;return x;

}

main()

{int i,s=1;

for(i=1;i<=s;i++)s+=fun();

printf(”%d\n”,s);

}

程序运行后的输出结果是()。

A.11

B.21

C.6

D.120

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