问题 单项选择题

有以下程序
main()
int i,j,x=0;
for(i=0;i<2;i++)
x++;
for(j=0;j<=3;j++)
if(j%2)continue;
x++;

x++;

printf("x=%d\n",x);

程序执行后的输出结果是

A) x=4
B) x=8
C) x=6
D) x=12

答案

参考答案:B

解析: 此程序考查了for循环和x++。对于大循环,有两个x++,其中循环3次,对于小循环,循环三次,但是运行了两次x++,所以最后结果是6+2=8。

阅读理解

阅读理解。

     DENVER, COLORADO-What does it take to be a hero? In the case of live Denver children, it only takes

a cry for help. Here's the story of these five heroes as Gary Lewis, the man they helped, tells it.

     "I like to work on my old car. It's my hobby. I wanted to put a new transmission (传动装置) in the car.

I put the car up on blocks (大块木头) because I wanted to get under it. I was trying to get the old transmission

out when suddenly the car moved forward and fell off the blocks. It came down on my chest. I couldn't

breathe."

     "I tried to shout for help for about five minutes, but I almost could not breathe. Could anyone hear me?

Was I going to die? Then all of a sudden I heard some little children from the neighbourhood. They were

running to the car and saying,'What happened, sir?'"

     "'Get help, please. I can't breathe,' I told them. One of the children ran to his house and told his mom to

call 911. Then, before I knew what was happening, all of the children were around the car. They used every

muscle (肌肉) in their bodies to lift (抬起) the car, and I was able to get out from under it."

     Lewis got out from under the car with just a few cuts. He didn't even have to go to the hospital. "These

children are my heroes," he says. "I don't know how they did it, but I am lucky to be alive."

     Raymond Brown, father of two of the children, is very proud of them. "We try to teach them to do the

right thing. This shows we're doing it the right way, I guess," he says.

1. The car fell off the blocks because _____.

A. the children pushed it

B. it moved forward by itself

C. Gary Lewis moved the blocks

D. it was driven by someone.

2. Gary Lewis couldn't breathe because _____.

A. there was a heavy car on top of him

B. he was running very fast

C. he had a bad cold

D. he was working too hard

3. Lewis was able to get out from under the car when _____.

A. the children worked together to lift it up a little bit

B. Raymond Brown came and pulled him out

C. he pushed the car forward

D. the police came to his help

单项选择题