问题 单项选择题

下列程序段的输出结果是 #include<iostream.h> void fun(int*x,int*y) {cout<<*x<<*y; *X=3; *y=4; } void main() {int x=1,y=2; fun(&y,&x); cout<<X<<y<<endl; }

A.2143

B.1212

C.1234

D.2112

答案

参考答案:A

解析:[命题目的] 对函数传参的考查。 [解题要点] 在fun函数中,x接收的是main函数中y的地址,所以*x值为2,同样,*y值为1,所以第1次输出的是2 1,第2次改变。x的值等同于改变y的值,改变*y的值也即改变x的值,所以第2次输出的是4 3。 [考点链接] C++语言中函数的传参方式中关于指针的应用。

阅读理解

阅读短文,判断下列句子是否符合短文内容。符合的写“A”,不符合的写“B”。

     Water is the most important in our lives. Not Many people understand this but it's quite true. The human

body can go without food for a long time. We've got many examples for this. Yet two or three days without

water can usually make people die. Man can't live without water.

     Many people don't understand how much water the human body needs to work well, and many people,

especially young people, do not drink enough water, even in very hot weather. About two thirds of our body

is water. When we do sports, some of the water will get away from our body. If we don't drink some water,

our body won't have enough water. And if we don't have enough water, we'll feel tired and many of us will

get ill. So you know how important water is to us.

     But at present we face water crisis (危机). Water is becoming less and less. So, we should protect water

resources (资源) and try our best to save water in our daily life. Here are some tips for saving water:

     1. Turn off the tap (水龙头) in lime.

     2. Take shorter showers.

     3. Don't let water run while washing your face and reuse the water after we finish washing.

     4. Encourage your friends and neighbors to join in the action of saving water.

( )1. Nobody can live without water.

( )2. About one third of our body is water.

( )3. If one doesn't have enough water, he'll feel tired and may get ill.

( )4. We'd better take longer showers and let water run while washing.

( )5. It's our duty to protect water resources and save water.

单项选择题