问题 填空题

设有下列程序:#include<stdio.h>#include<string.h>main(){ int i; char s[10],t[10]; gets(t); for(i=0;i<2;i++) { gets(s); if(strcmp(t,s)<0)strcpy(t,s); } printf("%s\n",t);}程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是 ______。

答案

参考答案:QTHRG

解析: strcmp(t,s)函数用来比较t和s所指字符串的大小,若t>s,则函数值大于0;若t=s,则函数值等于0:若t<s,则函数值小于0。strcpy(t,s)函数的功能是把字符数组s所指字符串的内容复制到字符数组t所指的存储空间中。 本题中,t[10]="CDEF"。第一次循环,s[10]="BADEF",if语句的控制条件strcmp(t,s)<0不成立,接着执行第二次循环.s="QTHRG", if语句的控制条件strcmp(t,s)<0成立,执行下列的语句,将字符数组s所指字符串的内容复制到字符数组t所指的存储空间中,然后输出字符数组t。

完形填空

As a teenager,I am often asked what I am going to be in the future. A lawyer?A doctor?Or a scientist?No,my ideal career is to be a teacher. One of the ____for that is I want to be a teacher like Mr. Chen.

“Look!Do you know what it is?A-ha,it’s the_____!And it will always move around the sun.” Mr. Chen said and pointed to his head. He then touched the nose and ___, “Can you tell me the name of this mountain? It is the highest mountain on Earth! What’s the _______of it? Yes, it’s 8844.43 metres.”  I’ll never forget my first geography lesson. He was______humorous that we all fell in love with his lessons______. It’s Mr. Chen who opened the door of geography for us.

Generally speaking, most of the teachers are strict   students and sometimes a little bit demanding(苛求的), not so with Mr. Chen. He is a lighthouse, showing us the way to the treasure of knowledge. He is a friend and easy to get    with, always encouraging us to speak out loud without  our shyness and other disadvantages. He is an example, volunteering his time to students and other teachers.

One day I happened to meet him in the hospital. Seeing the cut on his arm, I realized he was donating his    . I was moved and was     another lesson, a lesson of love and devotion.

Every time I see my globe(地球仪), it would   me of Mr. Chen. He is the most unforgettable teacher I have    met and he will always be. Someday I hope I am      to be a teacher like him.

Thank you, Mr. Chen, thank you for making learning not a job but a joy.

Thank you for helping me to discover what I do best and to do it even     

Thank you for understanding all of us and giving us the time and care each of us needs.

小题1:

A.replies

B.reasons

C.rewards

D.results

小题2:

A.moon

B.earth

C.star

D.sun

小题3:

A.advised

B.announced

C.added

D.answered

小题4:

A.distance

B.weight

C.size

D.height

小题5:

A.very

B.too

C.really

D.so

小题6:

A.at present

B.at once

C.at times

D.at first

小题7:

A.with

B.to

C.in

D.for

小题8:

A.away

B.together

C.angry

D.along

小题9:

A.thinking

B.caring

C.considering

D.supposing

小题10:

A.money

B.blood

C.clothes

D.time

小题11:

A.taught

B.given

C.taken

D.had

小题12:

A.remembers

B.represents

C.warns

D.reminds

小题13:

A.just

B.never

C.ever

D.yet

小题14:

A.able

B.about

C.allowed

D.available

小题15:

A.well

B.good

C.better

D.best

填空题