7.Option Base 1
Private Sub Command1_Click( )
Dim a(10) As Integer
Dim n As Integer
n=3
If n<10 Then
Call GetArray(a,n)
End If
End Sub
Private Sub GetArray(b( ) As Integer,n As Integer)
Dim c(10) As Integer
j=0
For t=1 To n
b(t)=Rnd_100
If b(t)/2=b(t)2 Then
j=j+1
c(j)=b(t)
End If
Next t
Print j
End Sub
以下叙述中错误的是(C)(单)
A.数组b中的数范围为0-100
B.c数组下标的下界从1开始
C.GetArray过程的参数n是按值传送的
D.语句If b(t)/2=b(t)2 Then 是判断数组b中元素的值是否为整数
8.在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Option Base 1
Private Sub Command1_Click( )
Dim a
a= Array(1,2,3,4,5)
For c=1 To Ubound(a)
a(c) = a(c)+c-1
Next c
Print a(3)
End Sub
程序运行后,单击命令按钮,则在窗体上显示的内容是(B)(单)
A.4
B.5
C.6