问题 单项选择题

在窗体上画一个名称为Command1的命令按钮,然后编写如下程序:Dim SW As BooleanFunction func(X As Integer) As IntegerIf X < 20 Then Y = X Else Y = 20 + X End If func = Y End FunctionPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y AsSingle)SW = FalseEnd SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) SW = True End SubPrivate Sub Command1_Click() Dim intNum As Integer intNum = InputBox("")If SW Then Print func(intNum) End If End Sub程序运行后,单击命令按钮,将显示一个输入对话框,如果在输入对话框中输入25,则 程序的执行结果为______。

A.输出0

B.输出25

C.输出45

D.无任何输出

答案

参考答案:D

解析:当鼠标指针在屏幕的某个对象上按键时,就会激发这个对象的 MouseDown 事件与 MouseUp 事件。 本题中单击的是命令按钮,而不是窗体,故窗体的 MouseDown 事件与 MouseUp 事件没有被激发,所以 SW为 False,因为如果定义了一个 Boolean 型变量,如果不对它赋值,默认就是 False。所以 Print func(intNum)语句没有被执行,当然也就无任何输出了。

单项选择题
完形填空
Sumo wrestlers (相扑选手) are usually big, heavy men.The biggest sumo wrestler of all the time is Konishiki, who now  26  about 230 kg.Born in Hawaii, he was  27  a big boy.When he was a teenager, some people  28  he go to Japan and become a sumo wrestler.
Although he took their advice, at first it was a  29  life.“I had to clean the toilets and  30  the rubbish,” Konishiki remembered, “I knew I had to  31  to the life in Japan.I said to myself, ‘I  32 learn Japanese.’ Soon I could  33  it quite well.”
Konishiki’s career started  34 , and he was soon upgraded to a higher rank.But despite his  35  he soon had health problems.The doctors told him that he should  36  some weight.“I started dieting.I  37  to do it.But I did it too  38 ,” he said, “I lost some of my strength, too.”
He lost a lot of fights, and then his parents got  39  in a car crash.“I must go and  40  them,” he thought.Though it was only three days  41  a big tournament (锦标赛), he flew back to Hawaii.Although he was quite  42 , they were not badly injured.
When he returned, he knew that he had to do well.The newspapers said, “Konishiki must win,  43 he will go down in rank.”
Though he had many problems, Konishiki won 14 of his 15 fights, and won the Emperor’s Cup.He was so  44  that he cried.“You ought not to show your feelings,” he said, “but I couldn’t  45  it.”
小题1:
A.meansB.measuresC.weighsD.has
小题2:
A.alwaysB.hardlyC.sometimesD.once
小题3:
A.promisedB.allowedC.consideredD.suggested
小题4:
A.realB.hard C.comfortableD.rich
小题5:
A.sell B.bringC.takeD.empty
小题6:
A.get usedB.respond C.devote D.lead
小题7:
A.wouldB.canC.must D.may
小题8:
A.speakB.sayC.learn D.tell
小题9:
A.badB.wellC.suddenlyD.similarly
小题10:
A.failureB.successC.effort D.fame
小题11:
A.gainB.loseC.save D.spare
小题12:
A.failed B.beganC.hadD.refused
小题13:
A.stupidlyB.carefullyC.slowlyD.quickly
小题14:
A.shockedB.destroyedC.ruinedD.injured
小题15:
A.visitB.care C.searchD.serve
小题16:
A.afterB.sinceC.beforeD.until
小题17:
A.happyB.worriedC.surprisedD.regretful
小题18:
A.becauseB.but C.orD.and
小题19:
A.sadB.nervousC.curiousD.happy
小题20:
A.do B.help C.feelD.leave