问题 填空题

在窗体上画一个命令按钮Command1,然后编写如下程序:
Private Sub Command1_Click()
Dim arr()As Integer
ReDim arr(3)
For i=0 To 3
art(i)=i
Next i
x=InputBox("请输入一个数字:")
If Val(x)>4 Then
ReDim arr(4)
arr(4)=x
End If
Me.Print(arr(4)-arr(3))
End Sub
程序运行后,单击命令按钮,在输入对话框中输入12,输出结果为 【10】

答案

参考答案:L

解析:[评析] 用Redim语句重定义数组的维数时,原有维数内的内容将被破坏。除非用Redim Preserve来重新定义维数。
本题中由于输入值x>4,动态数组在被重定义为包含4个元素的数组后(即Redim arry(3),此时arry(3)=3),
重新被定义为包含5个元素的数组,而重定义时并未用Preserve关键字。故此时arry(3)=0(实际上arry(0)、 arry(1)、arry(2)的值也都为0,即Integer类型变量的初始值)。

完形填空
My friend John always has something to tell me. He knows so much that   21  men have to have older and more worldly wise men to tell them,   22 , who to trust, how to care for others and how to live life    23    the fullest.
Recently, John lost his    24    Janet. For eight years she fought against cancer, but in the end her sickness had the last    25 . One day John took out a folded piece of   26   from his wallet. He had found it, so he told me, when he     27   up some drawers at home.
It was a    28    love letter Janet had written. The note could look like a school girl’s scrawls(潦草地写,乱涂) about her dream guy.    29   the letter was written by a woman who had had seven children, a woman who fought for her life and who    30   only had a few months left to live.
It was    31   a beautiful recipe (处方,食谱) for how to keep a marriage together. Janet’s    32 of her husband begins like this, “Loved me. Took care of me. Worried about me.”
“Helped me when I was ill.” The next    33   reads. After that she turned    34  the paper and added “Warmth. Humor. Kindness. Thoughtfulness.” And then she writes about the husband she has    35   with and loved most in her life. “  36 there when I needed you.” The last words she wrote   37  all the others. I can see her for me when she added thoughtfully “Good friend.”
I stand beside John now, and cannot pretend to know how it feels to lose someone who is as close to   38  as Janet was to him. I need to   39  what he has to say much more than he needs to talk.
“John,” I ask. “How do you stick together with someone through 38 years—not to mention the sickness? How do I know     40    I can bear to stand by my wife’s side if she becomes sick one day?”
“You can.” he says quietly, “ If you love her enough, you can.”
小题1:
A.oldB.wiseC.youngD.foolish
小题2:
A.for instanceB.at no timeC.in that caseD.as a matter of fact
小题3:
A.inB.toC.atD.for
小题4:
A.friendB.colleagueC.wifeD.sister
小题5:
A.possibilityB.chanceC.hopeD.word
小题6:
A.handkerchiefB.clothC.leatherD.paper
小题7:
A.fixedB.lookedC.tidiedD.put
小题8:
A.smallB.longC.descriptiveD.talkative
小题9:
A.SoB.ButC.AndD.While
小题10:
A.probablyB.surelyC.certainlyD.definitely
小题11:
A.onlyB.firstlyC.lastlyD.also
小题12:
A.imaginationB.descriptionC.dreamD.expectation
小题13:
A.letterB.noteC.lineD.paragraph
小题14:
A.awayB.downC.offD.over
小题15:
A.livedB.dealtC.quarreledD.argued
小题16:
A.ConstantlyB.AlwaysC.NeverD.Seldom
小题17:
A.take the place of B.get rid ofC.take awayD.sum up
小题18:
A.meB.JanetC.JohnD.you
小题19:
A.speak upB.repeatC.discussD.hear
小题20:
A.why B.whereC.ifD.when
单项选择题