首页 > 自考
题目内容 (请给出正确答案)
[单选题]

如下程序的输出结果是什么#include<stdio.h>int main(void){int aaa=0;aaa=011;printf("%d",aaa);return 0;}()

A.011

B.11

C.9

D.%d

答案
收藏

9

如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“如下程序的输出结果是什么#includeint main(v…”相关的问题
第1题
若有如下程序: include "stdio.h" main() { char s[30]; Strcpy(&S[0],"

若有如下程序: include "stdio.h" main() { char s[30]; Strcpy(&S[0],"adc"); Strcpy(&S[1],"def"); strcpy(&S[2],"gh");; printf("%S\n",s); 则程序运行后的输出结果是【 】。

点击查看答案
第2题
若有如下程序: include"stdio.h" main() {char s[30]; strcpy(&s[0],"abc"); st

若有如下程序: include"stdio.h" main() {char s[30]; strcpy(&s[0],"abc"); strcpy(&s[1],"de"); strcpy(&s[2],"f"); printf("%s\n",s); } 则程序运行后的输出结果是【 】。

点击查看答案
第3题
已知程序清单如下()#include<stdio.h>main(){char c1,c2;scanf("%c,%c",&c1,&c2);switch(c1){ca

已知程序清单如下()

#include<stdio.h>

main()

{char c1,c2;

scanf("%c,%c",&c1,&c2);

switch(c1)

{

case 'a':printf("100");break

case 'b':

{switch(c2)

{case'+':printf("90");break;

case'-':printf("85");)break

}break;

}

}

当输入"b,-"时,程序的输出结果是

A.100

B.90

C.85

D.不确定

点击查看答案
第4题
若有如下程序,则程序运行结果为:()#include<stdio. h>main(){ int x=1, a=0;switch (x)case 1:a++;case 2: a++ ;break;case 3: a++ ; break;printf(”a=%d\n" ,a)

A.=0

B.=1

C.=2

D.=3

点击查看答案
第5题
有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: include <st

有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: include <stdio.h> include "myfun.c" main() { fun(); prinff("\n"); } myfun.c文件如下: void fun() { char s[80],c;int n=0; while((c=getchar())! :\n) s[n++] =c; n--; while (n>=0) prinff("%c" , s [n--] ); } 当编译连接通过后,运行程序T18时,输入"Thank!”,则输出结果是【 】。

点击查看答案
第6题
程序中头文件myfile.h的内容是: define N 5 define M1 N*3 程序文件code.C内容如下: 1nClUde
<stdi0.h> include”myfile.h” define M2 N*2 void main() { int i; i=M1+M2; printf("%d\n",i); } 程序编译后运行的输出结果是()。

A.1 0

B.20

C.25

D.30

点击查看答案
第7题
以下程序运行时输入:12<回车>,执行后输出结果#include<stdio.h>main(){char ch1,ch2;int n1,n2;c

以下程序运行时输入:12<回车>,执行后输出结果

#include<stdio.h>

main()

{char ch1,ch2;int n1,n2;

ch1=getchar();ch2=getchar();

n1=ch1-'0';n2=n1*10+(ch2-'0');

printf("%d\n",n2);

}

点击查看答案
第8题
下面程序的功能是调用函数fun计算:m=1-2+3-4+…+9-10,并输出结果。#include<stdio.h>int fun(int n

下面程序的功能是调用函数fun计算:m=1-2+3-4+…+9-10,并输出结果。

#include<stdio.h>

int fun(int n)

{int m=0,f=1,i;

for(______;i<-n;i++)/*第一空*/

{m+=i*f;

f=______;/*第二空*/

}

return m;

}

main()

{printf("m=%d\n",______);)/*第三空*/

点击查看答案
第9题
若输入3、4、5,程序的输出结果为【 】。 include "math.h" main () { float a,

若输入3、4、5,程序的输出结果为【 】。 include "math.h" main () { float a, b, c, s, area; scanf("%f,%f,%f",&a,&b,&c); s=1.0/2*(a+b+c); area=sqrt (s* (s-a) * (s-b) * (s-c)); printf ("a=%7.2f,b=%7.2f, c=%7.2f, s=%7.2f", a,b, c, s); printf ("area=%7.2f\n", area); }

点击查看答案
第10题
‎下列程序的输出结果为()。‎#include‎void main()‎{int a[5] = {1, 3, 5};‏int i, sum = 0;‏for (i = 0; i < 5; i++)‎{sum += a[i];}printf ("sum = %d/n", sum);}

A.sum = 9

B.9

C.sum = 25

D.sum = 15

点击查看答案
第11题
阅读下列程序,则程序的输出结果为【 】。 include"stdio.h" struct ty {
int data; char c;}; main() { struct ty a={30,x}; fun(a); printf("%d%c",a.data,a.c);} fun(struct ty b) { b.data=20; b.c=y;}

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