单项选择题
有以下程序: main( ) { int i; for(i=0;i<3;i++) switch(i){ case 0:printf("%d",i); case 2:printf("%d",i); default:printf("%d",i); } } 程序运行后的输出结果是( )。
A.22111
B.21021
C.122
D.12
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序:#define f(x) (x*x)main(){ int i1,i2;i1=f(8) f(4); i2=f(4+4) f(2+2);printf( %d,%d n ,i1,i2);}程序运行后的输出结果是______。
A.64,28
B.4,4
C.4,3
D.64,64
点击查看答案&解析
单项选择题
有以下程序main( ){ char k; int I;for(i=1;i<3;i++){ scanf(“%c”,&k);switch(k){ case ‘0’: printf(“another n”);case ‘1’: printf(“number n”); } } }程序运行时,从键盘输入:01,程序执行后的输出结果是( )。
A.another number
B.another number another
C.another number number
D.number number
点击查看答案
相关试题
有以下程序:struct STU{ char name[...
以下程序中函数scmp的功能是返回形参指针s...
下面程序的功能是输出以下形式的金字塔图案...
有以下程序:#include struct STU{char...
尔排序属于( )。