问题 单项选择题

下列语句中,在字符串s1和s2相等时显示"they are Equal"的是( )。

A.if(*s1==*s2)

B.if(!strcmp(s1,s2))
puts("they are Equal"); puts("they are Equal");

C.if(s1==s2)

D.if(strcmp(s1,s2))
Puts("they are Equal"); puts("they are Equal");

答案

参考答案:B

解析: 字符串比较不能用两个等于号(=)来进行比较,应使用函数strcmp(s1,s2)来比较。函数 strcmp(s1,s2)的功能:当字符串s1和s2相等时,返回值为0。因此,当表达式!strcmp(s1,s2)=1时,条件成立,执行后面的语句,输出they are Equal。

阅读理解

阅读理解。

     The expression "down to earth" means being open and honest. It is easy to get on with someone who

is down to earth. A down-to-earth person is the opposite of someone who acts important or proud.

     Down-to-earth people could be important members of society. But they do not consider themselves to be

better than others who are less important. A person who is filed with his own importance and pride is said to

have his nose in the air.

     Americans use another expression that is similar in some ways to down to earth. The expression is both

feet on the ground. Someone with both feet on the ground is a person with a good understanding of reality

(现实). He may have dreams, but he does not allow them to have influence on his understanding of what is

real.

     The opposite kind of person is one who has his head in the clouds. Someone with his head in the clouds

is a person whose mind is not on what is happening in real life. Such a person may be called a day-dreamer.

     When we have both our feet on the ground, and when we are down to earth, we do not have our noses

in the air. We act honestly and openly to others. Our lives are like the ground below us—solid (牢固的) and

strong.

1. A down-to-earth person could be _________.

A. social and proud

B. good and opposite

C. real and important

D. strong and changeable

2. The expression "has one's nose in the air" means _________.

A. 眉飞色舞

B. 目中无人

C. 瞻前顾后

D. 春风得意

3. This passage mainly talks about _________.

A. the use of some expressions

B. dreams and achievements

C. the lifestyle of honest people

D. honesty and understanding

4. If you want to understand what is real in life, you have to _________.

A. get along with other people easily

B. learn from those who are down to earth

C. be a good dreamer with quick mind

D. have both your feet on the ground

5. If you only consider your own importance, _________.

A. you'll think you are better than others

B. your life will be like the solid and strong ground

C. you'll be hated by down-to-earth people

D. your life will be filed with love

填空题