A.Byte
B.Long
C.Float
D.Double
E.Object
F.AandB
G.CandD
第1题:
A.Char
B.Byte
C.Float
D.Double
E.Object
第2题:
以下程序的输出结果是( )。
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
第3题:
运行下列程序时,从键盘输入字母H,则输出结果是()。 #include <stdio.h> int main() { char ch; ch=getchar(); switch(ch) { case 'H':printf("Hello!n"); case 'G':printf("Good morning!n"); default:printf("Good Bye!n"); } }
A.Hello!
B.Hello! Good morning!
C.Hello! Good morning! Good Bye!
D.Hello! Good Bye!
第4题:
给出下列代码段: public class ex38 { public static void main (String args [ ] ) { int m; switch(m) { case 0: System.out.println ( "case 0" ); case 1:System.out.println("case 1");break; case 2: default: System.out.print in ("default") } } 下列m的______值将引起"default"的输出。
A.0
B.1
C.2
D.以上答案都不正确
第5题:
【单选题】在执行下述程序时,若从键盘输入字母H,则输出结果是_______。 #inlude <stdio.h> main() { char ch; ch=getchar(); switch(ch) { case 'H':printf("Hello! n"); case 'G':printf("Good morning! n"); default:printf("Bye_Bye! n"); } }
A.Hello!
B.Hello! Good morning!
C.Hello! Good morning! Bye_Bye!
D.Hello! Bye_Bye!