运行下面程序时,从键盘输入字母H,则输出结果是_____.
#include <stdio.h>
void 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! D) Hello!
Good morning! Bye_Bye!
Bye_Bye!
登录后提交答案