运行下面程序时,从键盘输入字母H,则输出结果是#includestdio.hmain(){ 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 Moring!C.Hello! Good morning! Bye_Bye!D.Hello! Bye_Bye!
运行下面程序时,从键盘输入字母H,则输出结果是
#include<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 Moring!
C.Hello! Good morning! Bye_Bye!
D.Hello! Bye_Bye!
相关考题:
在执行以下程序时,如果从键盘上输入ABCdef,则输出为______。include main(){char 在执行以下程序时,如果从键盘上输入ABCdef<回车>,则输出为______。#include <stdio.h>main (){ char ch; while ((ch=getchar())!="\n") { if (ch>='A' ch<='B')ch=ch+32; else if (ch>='a' ch<='z')ch=ch-32; printf("%c",ch); } printf("\n");}A.ABCdefB.abcDEFC.abcD.DEF
运行下面程序时,从键盘输入字母H,则输出结果是( )。A.B.C.D.A.AB.BC.CSXB 运行下面程序时,从键盘输入字母H,则输出结果是( )。A.B.C.D.A.AB.BC.CD.D
运行下面程序时,从键盘输入字母H,则输出结果是includemain(){ char ch;ch=getchar();s 运行下面程序时,从键盘输入字母H,则输出结果是 #include<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! GoodMoring!C.Hello! Goodmorning! Bye_Bye!D.Hello! Bye_Bye!
运行下面程序时,从键盘输入字母H,则输出结果是 main() { char ch; ch=getchar(); swimh(ch) {case'H':printf("Hello!\n"); case'G':printf("Good morning!\n"); default:printf("Bye_Bye!\n"); } }A.Hello!B.Hello! GoodMoring!C.Hello! Good moming! Bye_ye!D.Hello! Bye_ye!
运行下面程序时,从键盘输人字母A,则输出结果是()。 #include<stdio.h> void main() { char ch; ch=getchar(); switch(ch) { case’A’: printf("AAAAn"); case’B’: printf("BBBBn"); default:printf ("CCCCn"); } }A.AAAAB.AAAA BBBBC.AAAA BBBB CCCCD.AAAA CCCC
在执行下述程序时,若从键盘输入字母H,则输出结果是()。 #include <stdio.h> int main() { char ch; ch=getchar(); switch(ch) { case 'H':printf("Hello! n"); case 'G':printf("Good morning! n"); } }
2、在执行下述程序时,若从键盘输入字母H,则输出结果是()。 #include <stdio.h> int main() { char ch; ch=getchar(); switch(ch) { case 'H':printf("Hello! \n"); case 'G':printf("Good morning! \n"); } }
运行下列程序时,从键盘输入字母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!