问题 单项选择题

下面程序的运行结果是( )。    #include" iostream.h"    #define sum(a,b)a * b    void main( )    { int x;     x=sam(1+2,3);     cout < < x;    }

A.0

B.9

C.7

D.5

答案

参考答案:C

解析:本题考查宏定义的简单运用。理解宏定义,sum(a,b)o * b中a为1+2,b为3,故sum(1+2,3):1+2 * 3,即宏定义的替换过程是原样替换。注意:选项B)的计算方法是(1+2) * 3=9是错误的,注意,不要随意的加括号。

阅读理解

阅读理解。

     Mr. White works in an office. He liked reading in bed when he was at school. It was bad for his eyes

and now he is near-sighted. But he wouldn't want anybody else to know about it and he never wears a pair

of glasses. It often brings him some trouble.

     One winter morning he was sent to a village school on business. He got off a bus at a stop in a small town.

Then he had to walk there. The road to the village wasn't smooth. There were stones here and there. He fell

over several times and it made his clothes very dirty. At last he got to the village. Suddenly it began to blow

strongly and it got much colder. His hat was blown off while he was looking for the school. He had to run

after it but he couldn't catch it. He was wondering why his hat ran into a house as if it had legs. And then he

ran into the house, too. A big woman appeared and stopped him by shouting angrily," What are you running

after my hen for?"

1. According to the passage, which of the following is true?

A. Mr. White wears a pair of glasses.

B. Mr. White works in a village school.

C. Mr. White likes reading in bed in his office.

D. Mr. White often has some trouble because of his near sight.

2. What was the weather like when Mr. White was walking to the village school?

A. It was warm.

B. It was windy.

C. It was fine.

D. It was cool.

3. Mr. White couldn't get his hat because _________.

A. his hat had legs

B. his hat was the big woman's

C. he couldn't see his hat at all

D. he couldn't run as fast as his hat

单项选择题