问题 单项选择题

有以下程序
#include<stdio.h>
int f(int t[],int n);
main()
inta[4]=1,2,3,4,s;
s=f(a,4);printf("%d\n",s);

int f(int t[],int n)
if(n>0)returnt[n-1]+f(t,n-1);
else return 0;

程序运行后的输出结果是

A.4

B.10

C.14

D.6

答案

参考答案:B

解析:

函数的功能是求数组所有元素的和。递归表示为a[3]+a[2]+a[1]+a[0]+f(t,0)=10。

阅读理解

阅读理解。

     Is there someone you hate? Well, maybe you don't really hate them. But you get really angry every

 time you think of them. If you don't let this anger go, it can turn into bitterness (痛苦).         

     Bitterness appears when we can't forgive  (原谅)  someone who has hurt us or made us angry.  

Someone might say or do something that hurts us.  But instead of controlling the anger,  we keep it deep

 inside.  Before long,  a bitter feeling begins .to grow.  We may think we're hurting that person by criticizing. (指责)  him or her often,  but we're really only hurting ourselves.               

     Bitterness can not only lead to serious health problems such as heart disease, but also hurt our 

relationships with friends and family members. No one enjoys being around an angry person for very

 long.        

     If you see bitterness in your life, here are some ways to deal with it.         

    ●Accept it       

     Instead of trying to deny your anger,  make it clear to yourself and accept it.  See your anger for 

what it is and quickly deal with it.       

    ●Stop making excuses for it      

    You may feel you have a right to be angry.  You may think you're right and the other person is 

wrong.  You may even secretly enjoy making the other person look bad.  But in the end, bitterness

 hurts you much more than the other person.  The bitterness will hold you back, and the other person

 will go on with his or her life.       

    ●Forgive and forget it       

    You probably can't completely put the anger out of your mind.  But you can decide to forgive the

 other person.  Forget it and move on.  You'll enjoy better health and peace of mind.

1. According to the passage, we might get angry when someone _______.              

A. holds us back           

B. forgets us              

C. doesn't like us            

D. does hurt us

2. Bitterness comes from _______.                 

A.  our health problems like heart disease                  

B.  the anger that lives deep inside our mind                  

C.  the person who says something that hurts us                  

D.  our relationships with friends and family members

3. The underlined word "deny" in the passage means " _______".             

A. 误解        

B. 否认            

C. 疏远       

D. 减轻     

4. The best way to deal with the bitterness is to _______.                     

A.  make the person who hurts us look bad               

B.  hate the person who hurts us very often               

C.  accept that you are hurting the other person               

D.  forgive the person who hurts us and forget it

5. What can we learn from the passage?              

A. We should enjoy someone who hurts us.               

B. We should pay more attention to our friends.               

C. The peace of mind is more important than the hurt itself.               

D. It's better to let bitterness go along with the other person.

单项选择题 A1/A2型题