Byte
Long
Float
Double
Object
A and B
C and D
第1题:
A.Byte
B.Long
C.Float
D.Double
E.Object
F.AandB
G.CandD
第2题:
classsuper(publicintI=0;publicsuper(stringtext)(I=1))publicclasssubextendssuper(publicsub(stringtext)(i=2)publicstaticvoidmain(straingargs[])(subsub=newsub(Hello”);system.out.PrintIn(sub.i);))Whatistheresult?()
A.Compilationwillfail.
B.Compilationwillsucceedandtheprogramwillprint“0”
C.Compilationwillsucceedandtheprogramwillprint“1”
D.Compilationwillsucceedandtheprogramwillprint“2”
第3题:
A.Char
B.Byte
C.Float
D.Double
E.Object
第4题:
有以下程序 main() {int i; for(i=0;i<3;i++) switch(i) { case0:printf("%d",i); case2:printf("%d",i); default:printf("%d",i); } } 程序运行后的输出结果是
A.22111
B.21021
C.122
D.12
第5题:
有以下程序 main() { int i; for(i=0;<3;i++) switch(i) { csse 1: printf("%d",i); case 2: printf("%d",i); default: printf("%d",i); } } 执行后输出结果是
A.11122
B.12
C.12020
D.120
第6题:
#include
main()
{ char str[ ]=“The C program”,c;
int i;
for(i=2;(c=str[i])!=‘\0’;i++)
{ switch(c)
{ case ‘g’: ++i; break;
case ‘o’: continue;
default: printf(“%c”,c); continue;
}
printf(“*”);
}
printf(“\n”);
}
第7题:
A:Hello,()B:WherecanIbuysomestampsC://Atthestampcounteroverthere.
第8题:
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?()
第9题:
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?()
第10题:
switch (i) { default: System.out.printIn(“Hello”); } What is the acceptable type for the variable i?()
第11题:
Char
Byte
Float
Double
Object
第12题:
j = -1
j = 0
j = 1
j = 2
Compilation fails.
第13题:
A.Char
B.Byte
C.Float
D.Double
E.Object
第14题:
A.byte
B.long
C.char
D.float
E.Short
F.Long
第15题:
有以下程序 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
第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); } }
A.000102
B.000020
C.000122
D.000111
第17题:
以下程序的输出结果是( )。
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.000102
B.000020
C.000122
D.000111
第18题:
Hello, Peter. What do you do?()
第19题:
switch(x) { default: System.out.println(“Hello”); } Which two are acceptable types for x?()
第20题:
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? ()
第21题:
switch (i) { default: System.out.printIn(“Hello”); ) What are the two acceptable types for the variable i?()
第22题:
Byte
Long
Float
Double
Object
A and B
C and D
第23题:
Char
Byte
Float
Double
Object
第24题:
byte
long
char
float
Short
Long