题目内容:
设有如下程序:
Private Sub Search(a()As Variant,ByVal key As Variant,index%)
Dim I%
For I=LBound(A) To UBound(A)
If key=a(I) Then
Exit Sub
End If
Next I
Index=-1
End Sub
Private Sub Form_Load()
show
Dim b() As Variant
Dim n As Integer
b=Array(1,3,5,6,9,11,13,15)
Call Search(b,11.n)
Print n
End Sub
程序运行后,输出结果是 (6) 。
参考答案:
答案解析: