[单项选择题] 设有如下程序: Private Sub search(a()As Variant,ByVal key As Variant,index%)Dim I%For I = Lbound(a
14 查阅
[单项选择题] 设有如下程序: 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 index=I Exit SubEnd IfNext Iindex=-1 End Sub Private Sub Form_Load()ShowDim b()As VariantDim n As Integerb=Array(21,64,92,15,72,38,45,72)Call search(b, 45, n)Print n End Sub 程序运行后,输出的结果是
A.2
B.6
C.10
D.12
参考答案: