switch (i) { default: System.out.printIn(“Hello”); ) What are the two acceptable types for the variable i?()
相似题目
-
switch (i) { default: 310-025 Leading the way in IT testing and certification tools,www.testking.com - 27 - System.out.printIn(“Hello”); } What are the two acceptable types for the variable i? ()
-
switch (i) { default: System.out.printIn(“Hello”); } What is the acceptable type for the variable i?()
-
11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Integer(2); 13. switch(i) { 14. case 3: System.out.println(”three”); break; 15. default: System.out.println(”other”); break; 16. } 17. } What is the result?()
-
int I=1, j=0 switch(i) { case 2: j+=6; case 4: j+=1; default: j +=2; case 0: j +=4; } What is the value of j at line 16?()
-
public static void main(String[]args){ Integer i=new Integer(1)+new Integer(2); switch(i){ case3:System.out.println("three");break; default:System.out.println("other");break; } } Whatistheresult?()
-
int i = 1,j = -1; switch (i) { case 0, 1:j = 1; case 2: j = 2; default; j = 0; } System.out.println(“j=”+j); What is the result?()
-
switch (i) { default: System.out.printIn(“Hello”); } What is the acceptable type for the variable i?()
-
public class Test { public static void main(String Args[]) { int i =1, j = 0; switch(i) { case 2: j +=6; case 4: j +=1; default: j +=2; case 0: j +=4; } System.out.println(“j =” +j); } } What is the result? ()
-
1. int I=1, j=0 2. 3. switch(i) { 4. case 2: 5. j+=6; 6. 7. case 4: 8. j+=1; 9. 10. default: 11. j +=2; 12. 13. case 0: 14. j +=4; 15. } 16. What is the value of j at line 16?()
-
以下程序的输出结果是( ). 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); } }
-
05510013:有以下程序:int main( ){char i;for (; (i=getchar ())!='\\n';){switch (i-'a'){case 0: putchar (i);case 1: putchar (i+1); break;case 2: putchar (i+2);case 3: break;default:putchar (i); break;}}printf (\\\n\);}输入abcde后,程序的输出结果是( )。
-
若int i=10; 执行下列程序后,变量i的正确结果是( )。switch ( i ){case 9:i+=1;case10:i+=1;case11:i+=1;default : i+=1; }
-
读程序写结果:#include void main(){ int i=8;switch (i){ case 9:i=i+1;default:i=i+1;case 10:i=i+1;case 11:i=i+1;}cout<
-
以下程序的运行结果是inti;for(i = 0; i < 3; i++){switch (i){case 0: printf(\%d\, i);case 2: printf(\%d\, i);default: printf(\%d\, i);}}
-
有以下程序,运行时若输入 123450 <回车>,则输出结果是( ) #include void main() { int s; scanf(\%d\,&s); while(s>0) { switch(s) { case 1:printf(\%d\,s+5); case2:printf(\%d\,s+4);break; case3:printf(\%d\,s+3); default:printf(\%d\,s+1);break; } scanf(\%d\,&s); } }
-
下列程序的输出结果是()。include<stdio.h>main(){int a=0,i;for(i=1;i<5;i++){Switch(i){case 0:case 3:a+=1;case 1:case 2:a+=2;default:a+=3;}}printf("%d",a) :}
-
有以下程序: include main() { int s=0.n; for(n=0;n<3;n++) { switch(s) { case 0; case1:s+=1; case 2:s+=2;break; case 3:S+=3; default:s+=4; } printf("%d,"s); } } 程序运行后的输出结果是()。
-
intI=1,j=0switch(i){case2:j+=6;case4:j+=1;default:j+=2;case0:j+=4;}Whatisthevalueofjatline16?()
-
有以下程序 include <stdio.h> void main() { int i; for(i=0;i<3;i++) { switch(i) case 1: printf("%3d",i); 2: default: } 程序运行后的输出结果是()>
-
6、若int i=10;执行下面程序段后,变量i的值是()。 switch (i) { case 9: i+=1 ; case 10: i+=1 ; case 11: i+=1 ; default: i+=1 ; }
-
以下程序的输出结果是()main(){int a = 0,I;for(i = 1;i<5;i++;){switch(i){case 0:case 3:a+=2;case 1:case 2:a+=3;default:a+=5;}}printf(“%d\n,a”);}
-
include <stdio.h>void main(){int b,i;b=0;for(i=1;i<5;i++){switch(i){case 0:case 3:b+=2;case 1:case 2:b+=3;default:b+=5;}}printf(""%d\n"",b);}以上程序执行后,输出b的值是
-
以下程序的输出结果是().main(){ int a,i;a=0;for(i=1;i<5;i++){ switch(i){ case 0:case 3:a+=2;case 1:case 2:a+=3;default:a+=5;}}printf("%d/n",a);}
-
7、执行下列程序段后,变量i的值是()。 int i=10; switch(i) { case 9:i+=1; case 10:i+=1; case 11:i+=1; default:i+=1; }