问题 单项选择题

在窗体中添加一个命令按钮(名称为Commandl),然后编写如下代码:

  窗体打开运行后,三次单击命令按钮后,变量b的值是()

A.1

B.2

C.3

D.4

答案

参考答案:C

解析:

【解析】本题考查静态变量的知识。使用Static定义的变量称为静态变量,这"变量不同于局部变量.每次调用过程的时候不会重新声明和初始化该变量,变最中仍然保留上次调用结束时的值。在本题中,第一次调用b的值变为1,第二次调用b的值变为2,第三次调用b的值变为3。

阅读理解

阅读理解

       Joan worked in a hospital as a nurse. One evening there was a big dance at the hospital. Most of the

doctors and nurses would be there,but of course somebody had to be left to look after the sick children.

and Joan was not one of the lucky ones. She liked dancing very much, so when she had to start work that evening her friends were getting ready to go to the dance. She felt very sorry for herself.

        She went to each sick child one after another and said good-night, until she came to one little boy,

Dick. He was eleven years old, but he was already able to talk like an adult. Poor Dick had a very serious illness, and now he was hardly to move any part of his body except his hands. Joan knew he would never get any better, but he was always happy and always thinking about other people instead of herself.

       Dick knew that Joan loved dancing. So when she came to say good-night to him, he greeted her with

the words, "I'm very sorry that you have to miss the dance because of us. But we are going to have a party for you. If you look in my drawer, you will find a piece of cake. I saved it for my dinner today, so it is quite fresh. And there is also a dollar there. You can buy something to drink with that. And I'II get up and dance with you if I was able to , "he added.

       Suddenly the hospital dance seemed very far away and not at all important to Joan.

1. Joan felt unlucky that evening mainly because________ .

A. there was a dance ball at the hospital

B. of her unpleasant job

C. she would lose the chance to go to the big dance at the hospital

D. she was obligated(被迫) to look after the sick children

2. Poor Dick________ .

A. was no more than a boy of eleven

B. fell seriously ill

C. was clever at talking though he was very young

D. all the above

3. Dick was lovely because________ .

A. he was a nice, kind boy of eleven

B. he was always thinking about others more than himself.

C. he saved a piece of cake for his nurse

D. he could foresee (预知 ) that he would never get better

4. Which of the followings is NOT true? 

A. Dick got up to greet Joan when she came.

B. Dick heard about the dance.

C. Dick knew why Joan was unhappy.

D. Dick showed sympathy (同情) for Joan.

5. At that party for Joan, Dick probably _________. 

A. got up and danced with her

B. gave Joan some cake he had saved

C. brought her something to drink

D. lost the dollar which he was going to give Joan

单项选择题