问题 单项选择题

有以下程序 #include <stdio.h> void fun(char *t,char *s) { while(*t!=0) t++; while((*t++=*s++)!=0); } main( ) { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,aa); printf("%s,%s\n",ss,aa); } 程序的运行结果是 A)accxyy,bbxxyy B)acc,bbxxyy C)accxxyy,bbxxyy D)accbbxxyy,bbxxyy

答案

参考答案:D

解析: 本题中fun函数实现了字符串函数strcat的功能,将字符串aa连接到字符串ss的末尾。调用fun函数时,形参t和s分别指向了字符串ss和aa,然后通过一个while循环使t指向字符串ss的结束符的位置,第二个while循环将字符串aa中的字符(包括结束符“\0”)逐个复制到字符串ss的末尾处。

单项选择题
阅读理解

阅读表达。

     While it is impossible to live completely free of stress (压力), it is possible to prevent stress as well as

reduce its effect when it can't be avoided. The US Department of Health and Human Services offers the

following suggestions for ways to deal with stress.

     Try physical activity

     When you are nervous, angry or upset, try releasing (释放) the pressure (压力) through exercise or

physical activity. Running, walking, playing tennis and working in your garden are just some of the activities

you might try.

     Take care of yourself

     You should make every effort to eat well and get enough rest. If you easily get angry and cannot sleep

well enough, or if you're not eating properly, it will be more likely that you will fall into stressful situations.

If stress repeatedly keeps you from sleeping, you should go to see a doctor.

     Make time for yourself

     Schedule time (确定时间) for both work and entertainment. Don't forget, play can be just as important

to your well-being (幸福) as work. You need a break from your daily routine (日常事务) to just relax and

have fun. Go window-shopping or work on a hobby. Allow yourself at least a half hour each day to do

something you enjoy.

     Make a list of things to do

     Stress can result from disorganization and a feeling that "there's so much to do,and not enough time".

Trying to take care of everything at once can be too much for you and as a result, you may not achieve

anything. Instead, make a list of everything you have to do, then _____, check off each task as it is

completed. Set out to do the most important tasks first.

1. What is the best title of the passage? (Please answer within 10 words.)

    _______________________________________________________________________________________

2. Which sentence in the passage can be replaced by the following one? You might feel stressed as a result

    of bad temper, poor quality of sleep or diet.

    _______________________________________________________________________________________

3. Please fill in the blank in the last paragraph with proper words or phrases to complete the sentence. (Please

    answer within 10 words.)

    _______________________________________________________________________________________

4. Which of the suggestions do you think is the best for you? Why? (Please answer within 30 words.)

    _______________________________________________________________________________________

5. Translate the underlined sentence in the last paragraph into Chinese.

    _______________________________________________________________________________________