问题 单项选择题

若有条件表达式(exp)a++:b--,则以下表达式中能完全等价于表达式(exp)的是

A.(exp==0)

B.(exp!=0)

C.(exp==1)

D.(exp!=1)

答案

参考答案:B

解析: 条件运算符要求有3个操作对象,称三日(元)运算符,它是C语言中唯一的一个三目运算符。条件表达式的一般形式为:表达式17表达式2:表达式3。 其求解顺序是:先求解表达式1,若为非0(真)则求解表达式2,此时表达式2的值就作为整个条件表达式的值。若表达式1的值为0(假),则求解表达式3,表达式3的值就是整个条件表达式的值,注意++、--的用法。

阅读理解

There is a wonderful story about a young girl who had no family and no one to love her.

One day,feeling very sad and lonely, she was walking through a grassland when she noticed a small butterfly caught in a thorn (荆棘) bush. The young girl carefully released the Butterfly. Instead of flying away, the little butterfly changed into a beautiful fairy. The young girl rubbed(擦) her eyes in disbelief.“For your wonderful kindness,” the good fairy said to the girl,“I will give you any wish you would like.” The little girl thought for a moment and then replied,“I want to be happy.”The fairy  whispered(耳语) in her ear. Then the fairy disappeared.

As the little girl grew up, there was no one in the land as happy as she. Everyone asked her secret of happiness .She would only smile and answer,“The secret of my happiness is that I listened to a good fairy when I was a little girl.”

When she was very old and on her deathbed ,the neighbors gathered around her,they said to her “Tell us, please,” they begged,“Tell us what the good fairy said.” The lovely old woman simply smiled and said,“She told me that everyone, no matter how secure they seemed, no matter how old or young,how rich or poor, had need of me.”

小题1:______ the girl felt sad and lonely.

A.There was nobody to love her so

B.There were many friends

C.There was nothing to do

D.Seeing the butterfly was caught小题2: Noticing the butterfly was caught by the thorn,the orphan girl ______.

A.failed to help it release from the thorn

B.felt sorrow,but she didn’t go up to help it

C.fell down on it too

D.helped the butterfly escaped from the thorn小题3: The butterfly ______ after it was saved by the little girl.

A.flied away

B.changed into a fairy

C.still died

D.was more beautiful than before小题4:The only thing that the little girl wanted was________.

A.to be rich

B.to have her own parents

C.to have a lot of friends

D.happiness

单项选择题