![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
如下程序的输出结果是什么#include<stdio.h>int main(void){int aaa=0;aaa=011;printf("%d",aaa);return 0;}()
A.011
B.11
C.9
D.%d
![](https://static.youtibao.com/asksite/comm/h5/images/m_q_a.png)
9
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
A.011
B.11
C.9
D.%d
9
若有如下程序: include "stdio.h" main() { char s[30]; Strcpy(&S[0],"adc"); Strcpy(&S[1],"def"); strcpy(&S[2],"gh");; printf("%S\n",s); 则程序运行后的输出结果是【 】。
若有如下程序: include"stdio.h" main() {char s[30]; strcpy(&s[0],"abc"); strcpy(&s[1],"de"); strcpy(&s[2],"f"); printf("%s\n",s); } 则程序运行后的输出结果是【 】。
已知程序清单如下()
#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.不确定
A.=0
B.=1
C.=2
D.=3
有两个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!”,则输出结果是【 】。
A.1 0
B.20
C.25
D.30
以下程序运行时输入: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);
}
下面程序的功能是调用函数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",______);)/*第三空*/
若输入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); }
A.sum = 9
B.9
C.sum = 25
D.sum = 15