问题 单项选择题

设有数据定义语句char s1[10]="abc",s2[10]="ABCD";,则执行语句“printf("%d",strlen(strcat(s1,s2));”后的输出是( )

A.3
B.5
C.8
D.7

答案

参考答案:D

解析: 本题主要考查的知识点为strlen和strcat函数的使用。
[要点透析] strcat(s1,s2)函数是将s2中的字符串连接到s1中的字符串之后,即s1中的字符串变为"abcABCD",strlen(x)函数是求x中存放的字符串的长度,本题是求s1中字符串的长度,结果是7。

阅读理解

阅读理解

     In the future, machines will be improved and do more and more work for man. Few people have to

work for long hours. Man will have more time for leisure.  How will they use this leisure in the world of

tomorrow?

     In the future, the computer will help people to find the right place. It will ask them questions which

they will answer by pressing a button. It'll also show them pictures and they will say which ones they like,

then the computer will tell them how to find the place they want for holiday. TV will be used more in

education. It will also help people to use their leisure time well. There will be more programmes on how

to make and how to do things.

     In the future, people will certainly have to do less work. Machines will take more and more work from

man. This means that the rest of the time will be mostly leisure time.

     Some scientists say that man of the future will be able to get enough pleasure and enjoyment on their

own without going anywhere. According to other scientists, each man will put on a small cap. The cap

will make him see, feel and hear all kinds of enjoyable things.

1. People will improve __________ to do more work for themselves.

A. their skills

B. the ways

C. the machines

2. We can find the right places with the help of __________.

A. companies

B. computers

C. ourselves

3. The Chinese meaning of the phrase "by pressing a button" is __________.

A. 通过按键

B. 通过纽扣

C. 通过搜索

4. From the sentence "Man will have more time for leisure," we can guess leisure may be __________.

A. busy time

B. free time

C. work time

5. This passage mainly tells us something about __________ in the future.

A. machines

B. time

C. holiday

填空题