网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

【填空题】下列程序段运行的结果为() x=2; switch(x%3) { case 2: printf("Are "); case 1:printf("you "); case 0:printf("right"); default: printf("?"); }


参考答案和解析
tl0a={(1,2,3}{4,5,6},{7,8,9}};
更多 “【填空题】下列程序段运行的结果为() x=2; switch(x%3) { case 2: printf("Are "); case 1:printf("you "); case 0:printf("right"); default: printf("?"); }” 相关考题
考题 以下程序的运行结果是 【 9 】 。main( ){ int a=2,b=7,c=5;switch(a0){ case 1:switch(b0){ case 1: printf ("@"); break;case 2: printf("!"); break;}case 0: switch(c==5){ case 0 : printf (" * "); break;case 1 : printf(" # "); break;case 2: printf(" $ "); break;}default : printf("");}printf("\n");}

考题 若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是A)switch(x){ case 1.0: printf("*\n");case 2.0: printf("**\n");}B)switch((int)x);{ case 1: printf("*\n");case 2: printf("**\n");}C)switch(a+b){ case 1: printf("*\n");case 2+1: printf("**\n");}D)switch(a+b){ case 1: printf("*\n");case c: printf("**\n");}

考题 现有如下程序段,此程序段编译有错误,则程序段的错误出在#includemain(){ int a=30,b=40,c=50,d;d=a 30?b:c;switch(d){case a:printf("%d,",a);case b:printf("%d,",b);case c:printf("%d,",c);default:printf("#");}}A.default:printf("#");这个语句B.d=a30?b:c;这个语句C.case a:printf("%d,",a); case b:printf("%d,",b); case c:printf("%d,",c);这三个语句D.switch(d)这个语句

考题 若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+B) {case 1:printf("*\n"); case 2+1:printf("**\n");}D.switch(a+B) {case 1:printf("*\n"); case c:printf("**\n");}

考题 下列程序的输出结果是______。 main() { int i=3; switch(i) { case 1: case 2:printf("%d",i); case 3: case 4:break; default:printf("OK"); } }A.0B.3C.OKD.没有任何输出

考题 以下程序段的运行结果是( )。 include main() {int x=2,y=1: switch(x) {case 1: switch 以下程序段的运行结果是( )。 include<stdio.h> main() {int x=2,y=1: switch(x) {case 1: switch(y) {case 0:printf("x=2,y=1\n");break; case 1:printf("y=1\n");break; } case 2:printf("x=2\n"); } }

考题 有以下程序 main( ) { int i; for(i=0;i<3;i++) switch(i) { case 1: printf("%d",i); case 2: printf("%d",i); default: printf("%d",i); } } 执行后输出的结果是A.11122B.12C.12020D.120

考题 下面程序的输出结果为( )。 main( ) { int a=1,b=0; switch(a) { case 1:switch (b) { case 0: printf("**0**"); break; case 1: printf("**1**"); break; } case 2: printf("**2**"); break; }}A.**0**B.**0****2**C.**0****1****2**D.有语法错误

考题 下列程序的输出结果是______。 main() { int i=3; switch(i) { case1: case2:printf("%d",i); case3: case4:break; default: printf ("OK"); } }A.0B.3C.OKD.没有任何输出

考题 以下程序的运行结果是( )。main()(int a=2,b=7,c=5;switch(a>0){case 1:switch(b<0){case 1:switch(");break;case 2:printf("!");break;}case 0:switch(c==5){case 0:printf("*");break;case 1:printf("");break;case 2:printf("$");break;}default:printf ("&");}printf("\n");}

考题 若有以下定义,则正确的swish语句是______。 float x;int a,b;A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(x) {case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) {case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); {case 1:printf("*\n"); case 2:printf("**\n"); }

考题 若有以下定义:float x;int a,b; 则错误的switch语句是________。 A. switch(x){case 1.0:printf("*\n"); case 2.0:printf("*\n"); }B. switch(a){case 1:printf("*\n");case 2:printf("*\n"); }C. switch(a+b) {case 1:printf("*\n"); case 1+2:printf("*\n"); }D. switch(a+b);{case 1:printf("*\n");case 2:printf("*\n"); }

考题 设有说明:int a=1,b=0;,则执行以下语句的输出结果是______。 switch(a) {case 1: switch(b) {case 0:printf("**0**\n");break; case 1:printf("**1*\n");break; } case 2:printf("**2**\n");break; }A.**0**B.**0** **2**C.**0** **1** **2**D.switch语句中存在语法错误

考题 有以下程序 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.22111B.21021C.122D.12

考题 有以下程序 main() {int i; for(i=0;i<3;i++) switch(i) { case0:printf("%d",i); case2:printf("%d",i); default:printf("%d",i); } } 程序运行后的输出结果是A.22111B.21021C.122D.12

考题 有下列程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0 有下列程序: #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1:b++;break; } case 2: a++;b++;break; case 3: a++;b++; } printf("a=%d,b=%d\n",a,B) ; } 程序的运行结果是( )。A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1

考题 以下程序的输出结果是( )。 main { int i; for(i=0;i3;i++) switch(i){case 0:printf("%d",i); case 2:printf("%d",i); default:printf("%d",i); } }A.000102B.000020C.000122D.000111

考题 执行下面程序的正确结果是 ( ) main() {float a=1.9 switch(A) { case 0:printf("0000"); case 1:printf("1111"); case 2:printf("3333"); } printf("%f",A) ; }A.1.900000B.111133331.900000C.33331.900000D.00001111233331.900000

考题 若有以下定义,则正确的switch语句是______。float x;int a,b;A.switch(x) { case 1.0:printf("*\n"); csse 2.0:printf("**\n"); }B.switch(x) { case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) { case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); { case 1:printf("*\n"); case 2:printf("**\n"); }

考题 有以下程序main(){ int i; for(i=0;i3;i++) switch(i) { case 1: printf("%d",i); case 2: printf("%d",i); default: printf("%d",i); }}程序执行后的输出结果是A.011122 B.012C.012020 D.120

考题 若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.swimh(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+D. {case 1:pfintf("*\n"); case 2+1:pfintf("**\n");}switch(a-I-{case 1:pfintf("*\n"); case c:printf("**\n");}

考题 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是______。A.switch (x) {case 1.0: printf("*\n"); case 2.0: printf("**\n");}B.switch ( (int)x); {case 1: printf("*\n"); case2: printf("**\n");}C.switch (a+b) {case 1:printf("*\n"); case 2+1: printf("**\n");}D.switch (a+b)) {case 1: pfintf("*\n")}; case c: printf("**\n"));}

考题 下列程序段的输出结果是【】。int n=c; switch(n++) {default:printf(errorc;switch(n++){default:printf(error);break;case a:case A:case b:case B:printf(good);break;case c:caseC:printf(pass);case d:caseD:printf(warn);}

考题 若有以下定义:float x;int a,b,c=2;,则正确的switch语句是( )A.switch(x) { case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(int(x)) { case 1:printf("*\n"); case 2:printf("**\n"); }C.switch(a+b) { case 1:printf("*\n"); case 1+2:printf("**\n"); }D.switch(a+B){ case 1:printf("*\n"); case c:printf("**\n"); }

考题 下列程序的输出结果是_______。 main() { int i=3; switch(i) { case1: case 2:printf("%d",i) case 3: case 4:break; default : printf("OK") } }A.0B.3C.OKD.没有任何输出

考题 若有定义:float x=1.5;int a=1,b=3,c=2; 则正确的switch语句是( )。A.switch(x) { case 1.0: printf("*\n"); case 2.0: printf(" * * \n" );B.switch((iht)x); { case 1: printf(" * \n" ); case 2: printf(" * * \n" ); }C.switch(a +b) { case 1: printf(" * \n" ); case 2 + 1: printf(" * * \n" ); }D.switch(a + b) { case 1: pfintf(" * \n" ); case c: pfintf(" * * \n"); }

考题 有以下程序: main() { int i; for(i=0;i<3;i++) switch(i) { case1:printf("%d",i); case2:printf("%d",i); default:printf("%d",i); } } 执行后输出结果是( )。A.11122B.12C.12020D.120

考题 以下程序的输出结果是( )。main(){ int i; for(i=0;i3;i++) switch(i) { case 0:printf(3;i++)switch(i){ case 0:printf(%d,i);case 2:printf(%d,i);default:printf(%d,i); }}A.000102B.000020C.000122D.000111