刷题首页
题库
高中信息
题干
设有数组定义语句:Dim a(5) As Integer,Listl 为列表框控件。下列给数组元素赋值的语句,错误的是( )。
A.a(3)=3
B.a(3)=VAL(InputBox(“InputData”)
C.a(3)=Listl.ListIndex
D.a=Array(1,2,3,4,5,6)
上一题
下一题
0.99难度 选择题 更新时间:2019-09-12 12:53:42
答案(点此获取答案解析)
同类题1
下列逻辑表达式中能完全正确表示条件“year是闰年”的是( )。
A.year mod 4=0
B.year mod 400=0
C.(year mod 400="0)or(" year mod 4="0)and(" year mod 100<>0)
D.(year mod 400="0)and(" year mod 4="0)or(" year mod 100<>0)
同类题2
在VB中,若x=16,y=5,则表达式x-y Mod 3^2 的值是 ( )。
A.0
B.9
C.10
D.14
同类题3
运行如下Visual Basic程序,单击命令按钮Command1,出现如图所示的出错信息。发生“类型不匹配”错误时所执行的语句是( )
Private Sub Command1_Click()
Dim a As String, b As String, c As Integer
a = "Good" '①
b = "bye" '②
c =
__________1__________
'③
Text1.Text =" a" + b + c '④
End Sub
A.①
B.②
C.③
D.④
同类题4
Y为分段函数
求y的值。完成该流程图,在空白处填入_____
A.x mod 2 <> 0
B.x / 2 = 0
C.x =" 2" * n-1
D.x \ 2 = 0
同类题5
有如下VB 程序,该程序运行后在文本框Text1 中显示的结果是( )
Dim i As Integer, j As Integer, s As Integer, n As Integer
n =" 3:" s = 0
For i =" 1" To n
For j =" 1" To i
s =" s" + j
Next j
Next i
Text1.Text = s
End Sub
A.3
B.6
C.10
D.18
相关知识点
算法理论
面向对象程序设计 VB开发工具
赋值语句