单选题有以下程序:#includemain(){ chara[30],b[30]; scanf(%s,a); gets(b); printf(%s%s,a,b);}程序运行时若输入:howareyou?Iamfine回车则输出结果是( )。Ahow are you? 换行I am fineBhow换行 are you? I am fineChow are you? I am fineDhow are you?
单选题
有以下程序:
#include
main()
{
char a[30],b[30];
scanf(%s,a);
gets(b);
printf(%s%s,a,b);
}
程序运行时若输入:
how are you?I am fine<回车>
则输出结果是( )。
A
how are you? <换行>I am fine
B
how<换行> are you? I am fine
C
how are you? I am fine
D
how are you?
参考解析
解析:
scanf语句接收字符串时遇到空格就认为字符串读入结束,但是gets函数遇到回车才认为结束。本题中将第一个空格前面的部分赋值给a,将后面的部分赋值给b。答案选择B选项。
scanf语句接收字符串时遇到空格就认为字符串读入结束,但是gets函数遇到回车才认为结束。本题中将第一个空格前面的部分赋值给a,将后面的部分赋值给b。答案选择B选项。
相关考题:
设有三个串,s1="How", s2=" are", s3 =" you", 则这三个串连接后得到的结果串是_____________________。 A、"Howareyou"B、"How are you"C、"How are you."D、" How are you"
—How was your final exam?—_____________ A.Take it easy.B.You are rightC.I am not sure.D.Let’s have a drink.
- I am really fed up with Larry!_________________________________ A.How is she?B.Are you OK?C.Why do you say that?
有以下程序#include stdio.hmain(){ char a[20]="How are you?",b[20];scanf("%s",b); printf("%s %s\n",a,b);}程序运行时从键盘输入: How are you? 回车 则输出结果为 【 1 3 】 。
How are you feeling now? () A. Oh, much better.B. I am very happy.C. It’s not important.D. So beautiful and sweet.
________ is what I am anxious to know.A、How do you get rid of miceB、How you get rid of miceC、How can you get rid of miceD、How could you get rid of mice
- How are you, Bob? - ___________ Ted. A、How are you?B、I am fine, thank you.C、How do you do?D、Nice to meet you.
有以下程序jncludestdio.hmain( ){char a[20]=“How ale you?”,b[20];scanf(“%s”,B);pfinff(“%s%s\n”,a,B);}程序运行时从键盘输入:How are you?回车则输出结果为【 】。
有以下程序 #includestdio.h main( ) {char a[3O],b[30]; scanf("%S",a); gets(b); printf("%s\n%s\\n",a,b); } 程序运行时若输入: how are you? I am fine回车 则输出结果是( )。A.how are you? I am fineB.how are you?I am fineC.how are you?I am fineD.how are you?
以下程序:includemain(){char str[10];scanf("%s",str);printf("%s\n",str);}运 以下程序: #include<stdio.h> main() {char str[10]; scanf("%s",str); printf("%s\n",str); } 运行上面的程序,输入字符串how are you,则程序的执行结果是( )。A.howB.how are youC.hD.howareyou
有以下程序includestdio.hmain(){char a[30],b[30];scanf(“%s”,a);gets(b);printf(“%s\n%s\n”,a,b);}程序运行时若输入:how are you? I am fine回车则输出结果是A.how are you? I am fineB.how are you? 1 am fineC.how are you? I am fineD.how are you?
(31)有以下程序#include stdio.hmain(){ char a[30],b[30];scanf("%s",a);gets(b);printf("%s\n %s\n",a,b);}程序运行时若输入:how are you? I am fine回车则输出结果是A)how are you? B)howI am fine are you? I am fineC)how are you? I am fine D)row are you?
This is John.()A、Oh, I have never seen you.B、Yes, I am glad.C、Hello, John. Nice to meet you.D、How are you?
How are you going on with your English?()A、I am very well.B、I am going to the library.C、I am going to take College English Test Band Four.D、That's a good question
How are you,Bob?—greetings/How do you do?Hello!Hi!What’s up?()TedA、How are you?B、I’m fine.Thank you.C、How do you do?D、Nice to mee tyou.
How was your final exam?()A、Take it easy.B、You are right away.C、I am not sure.D、Let's have a drink.
单选题有以下程序:#include main(){ int i,j=0; char a[] = How are you,b[10]={0}; for(i=0;a[i];i++) if(a[i]==' ') b[j++]=a[i+1]; printf(%s,b);}程序运行后的输出结果是( )。AHayBHow are youCweDay
单选题有以下程序:#include#includemain(){ inti; chara[]=Howareyou!; for(i=0;a[i];i++) { if(a[i]=='') { strcpy(a,a[i+1]); i=0; } } printf(%s,a);}程序的运行结果是( )。Ayou!BHowareyou!Careyou!Dare you!
问答题A man is 36 years old. He asks the other man how old he is. The other man answers: “I am twice as old as you were when I was as old as you are today.” How old is the other man?
单选题有以下程序:#include main(){ int i,j=0; char a[] = How are you!,b[10]={0}; for(i=0;a[i];i++) if(a[i]==' ') b[j++]=a[i-1]; printf(%s,b);}程序运行后的输出结果是( )。AweBHow are you!CayDwe!
单选题Stan: Thank you from the bottom of my heart for saving my little girl’s life. John: ________. Stan: I can’t tell you how much I appreciate what you’ve done. John: I’m just happy I could help.AThere’s nothing to be afraid of.BThis is a wonderful day.CAnybody would have done the same.DI am glad to save her.