【单选题】【消耗次数:1】
以下程序段的运行结果是()。 int s=15; switch(s/4) {default: printf(Over ) ; case 1: printf(One ) ; break; case 2: printf(Two ) ; }
Two
Over Two
Over One
One
参考答案:
复制
纠错
相关题目
【单选题】 以下程序段的运行结果是()。ints=15;switch(s/4){default:printf("Over");case1:printf("One");break;case2:printf("Two");}
①  Two
②  OverTwo
③  OverOne
④  One
【单选题】 以下程序的运行结果是()。voidmain(){intn=9;switch(n--){default:printf("%d",n++);case8:case7:printf("%d",n);break;case6:printf("%d",n++);case5:printf("%d",n);}}
①  8
②  7
③  89
④  87
【单选题】 下列程序执行后的输出结果是() void func1(a) { switch(a) { case 1:printf(good); case 2:printf(nice); default:printf(end); } } main( ) { int i=2; func1(i); printf(\n); }
①  nice
②  end
③  good
④  niceend
【单选题】 有以下程序,程序运行以后的输出结果是() #include stdio.h main( ) { int a[ ]={2,3,5,4},i; for(i=0;i switch(i%2) { case 0:switch(a[i]%2) {case 0:a[i]++;break; case 1:a[i]--; }break; case 1:a[i]=0; } for(i=0;i printf(\n); }
①  3 3 4 4
②  2 0 5 0
③  3 0 4 0
④  0 3 0 4
【单选题】 有以下程序: main( ) { int c; while((c=getchar( ) ) != \n ) { switch(c- 2 ) { case 0 : case 1 : putchar(c+4) ; case 2 : putchar(c+4) ; break; case 3 : putchar(c+3) ; default: putchar(c+2) ; break; } } printf(\n } 当输入: 247, 程序的输出结果是()。
①  689
②  6689
③  66778
④  66887
【单选题】 下述程序的运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); } case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=1,b=1
②  a=2 ,b=1
③  a=2,b=2
④  a=3,b=3
【单选题】 有以下程序:main(){intc;while((c=getchar())!=\n){switch(c-2){case0:case1:putchar(c+4);case2:putchar(c+4);break;case3:putchar(c+3);default:putchar(c+2);break;}}printf("\n");}当输入:247回车,程序的输出结果是()。
①  689
②  6689
③  66778
④  66887
【单选题】 下述程序的运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=2,b=1
②  a=1,b=2
③  a=0,b=1
④  a=1,b=0
【单选题】 运行以下程序,从键盘上输入china# #includevoid main() { int v1=0,v2=0; char ch; while((ch=getchar())!=#) switch(ch) { case a: case h: default: v1++; case 0:v2++; } printf(%d,%d\n,v1,v2); } 运行结果( )。
①  2,2
②  3,3
③  4,4
④  5,5
【单选题】 #define X a+b main( ) { int a=3,b=4,s1; s1=2*X; printf(%d\n,s1); },以上程序的运行结果是( )?
①  8
②  14
③  10
④  6
随机题目
【简答题】 统计是统计工作、统计资料和统计学的统一体,[填空]是统计工作的经验总结和理论概括。
【简答题】 一元线性回归模型中有哪些基本假定??
【简答题】 在管理信息系统中,功能之间组成方式被称之为[填空]结构。
【简答题】 企业系统规划法是一种进行系统总体规划的[填空]化方法。
【简答题】 外部实体不受企业过程控制,在过程以外的事物或人,表达了该系统数据处理的外部来源和[填空]。
【简答题】 为了避免在数据流程图中出现线条[填空],同一个外部项可以在一张数据流程图中出现若干次。
【简答题】 按照决策问题的结构化程度不同,可以将决策问题分成结构化问题、[填空]问题和非结构化问题三种类型。
【简答题】 简述数据流程图的作用。
【简答题】 消费税中[填空] 、[填空]和[填空]采用定额税率
【简答题】 按照主权国家行使税收管理权的不同,税收可分为[填空]、[填空]、[填空]