计算机二级VB选择题 下载本文

Dim b(4) as Integer For i=1 to 4 b(i)= i+1 Next i End Sub

上面程序运行后,b(2)的值是______。

A:3

B:1

C:0

D:2

答案:A

等级:1 难度:1

知识点:VB知识点/数组应用举例

151、Private Sub Command1_Click() Dim w(4) as integer Dim y() as integer For i=0 to 4 w(i)= i+2 Next i y=w End Sub

上面程序运行后,y(1)的值是______。

A:0

B:1

C:3

D:2

答案:C

等级:2 难度:2

知识点:VB知识点/数组的基本操作

152、Private Sub Command1_Click() Dim w(4) as integer Dim y() as integer For i=0 to 4 w(i)= 2 * i Next i y=w End Sub

上面程序运行后,y(1)的值是______。

A:0

B:1

C:3

D:2

答案:D

等级:2 难度:2

知识点:VB知识点/数组应用举例

153、Private Sub Command1_Click() Dim w(4) as integer Dim y() as integer For i=0 to 4 w(i)= 3 * i Next i y=w End Sub

上面程序运行后,y(2)的值是______。

A:0

B:6

C:3

D:2

答案:B

等级:2 难度:2

知识点:VB知识点/数组的基本操作

154、Private Sub Command1_Click() Dim w(4) as integer Dim y() as integer For i=0 to 4 w(i)= w(i) + 3 Next i y=w End Sub

上面程序运行后,y(1)的值是______。

A:0

B:6

C:3

D:2

答案:C

等级:2 难度:2

知识点:VB知识点/数组应用举例

155、在picture1上输出数组W(i)的值用______语句可以实现。

A:Pictrue1.Print W(i)

B:Pictrue1= W(i)

C:Pictrue1.Picture= W(i)

D:Print W(i)

答案:A

等级:2 难度:2

知识点:VB知识点/数组的基本操作

156、控件数组中第一个元素的Index值是______。

A:0

B:1

C:空值

D:2

答案:A

等级:1 难度:1 知识点:VB知识点/控件数组

157、某个控件的Index值默认情况是______。

A:0

B:1

C:空值

D:2

答案:C

等级:2 难度:2

知识点:VB知识点/控件的基本知识

158、可以通过修改控件数组中控件的______值改变其在数组中的顺序。

A:Font

B:Caption

C:Name

D:Index

答案:D

等级:2 难度:2 知识点:VB知识点/控件数组

159、在程序运行时用______语句可以添加控件数组元素。

A:Add

B:New

C:Index

D:Load

答案:D

等级:3 难度:3 知识点:VB知识点/控件数组

160、在程序运行时用______语句可以删除控件数组元素。

A:UnLoad

B:Delete

C:Index

D:Load

答案:A

等级:3 难度:3 知识点:VB知识点/控件数组

161、Private Sub Command1_Click(Index As Integer) Select Case Index Case 0

Label1.BackColor= VbRed Case 1

Label1.BackColor= VbGreen Case 2

Label1.BackColor= VbBlue End Select End Sub

程序运行时单击第二个命令按扭Label1的背景色是______色。

A:红

B:绿

C:蓝

D:白

答案:B

等级:2 难度:2 知识点:VB知识点/控件数组

162、Private Sub Command1_Click(Index As Integer) Select Case Index Case 0

Text1.BackColor = VbRed Case 1