【单选题】【消耗次数: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
随机题目
【判断题】 因被投资单位破产清算等原因,有确凿证据表明长期股权投资发生损失,按规定报经批准后予以核销。(  )
① 
② 
【判断题】 已交付使用但尚未办理竣工决算手续的固定资产,按照估计价值入账,以后不允许再调整。(  )
① 
② 
【判断题】 因发生后续支出而增加固定资产成本的,应当按照重新确定的固定资产成本以及重新确定的折旧年限,重新计算折旧额。(  )
① 
② 
【判断题】 无形资产预期不能为高等学校带来服务潜力或经济利益的,应当按规定报经批准后将该无形资产的账面价值予以核销。(  )
① 
② 
【判断题】 项目支出结余资金是指支出预算工作目标已完成,或由于受政策变化、计划调整等因素影响导致工作终止,从而使得当年剩余的财政补助项目资金。(  )
① 
② 
【判断题】 .财政补助收入支出表反映高等学校某一会计年度财政补助收入、支出、结转及结余情况。(  )
① 
② 
【判断题】 征求意见稿的基本理念是在高等学校会计制度中适当引入收付实现制,同时兼顾预算管理、财务管理、资产管理、绩效评价的信息需求。(  )
① 
② 
【判断题】 高等学校在填制会计凭证、登记会计账簿时,应当填列会计科目的名称,或者同时填列会计科目的名称和编号,不得只填科目编号、不填列科目名称。(  )
① 
② 
【判断题】 高等学校应当设置“现金日记账”,由出纳人员根据收付款凭证,按照业务发生顺序逐笔登记。每日终了,应当计算当日的现金收入合计数、现金支出合计数和结余数,并将结余数与实际库存数核对,做到账款相符。(  )
① 
② 
【判断题】 “银行存款日记账”应定期与“银行对账单”核对,至少每日核对一次。(  )
① 
②