初三微机程序!~简单!

来源:百度知道 编辑:UC知道 时间:2024/06/25 18:47:01
有以下程序:
Option Base 1
D) im arr() As Integer
Private Sub Form_Click()
D) im i As Integer,j As Integer
ReDim arr(3,2)
For i=1 To 3
For j=1 To 2
arr (i,j)=i*2+j
Next j
Next i
ReDim Preserve arr(1,4)
For j=3 To 4
A) rr(3,j)=j+9
Next j
Print arr(3,2);arr(3,4)
End Sub
程序运行后,单击窗体,输出结果为( )
A. 0 13
B. 7 12
C. 0 0
D. 8 13
为什么是A
给我理由

Option Base 1
Dim arr() As Integer
Private Sub Form_Click()
Dim i As Integer,j As Integer
ReDim arr(3,2)
For i=1 To 3
For j=1 To 2
arr(i,j)=i*2+j 'arr()=[3 4
5 6
7 8]
Next j
Next i
ReDim Preserve arr(1,4)
'arr=[3 4 0 0
5 6 0 0
7 8 0 0]
For j=3 To 4
Arr(3,j)=j+9 'arr(3,3)=12,arr(3,4)=13
Next j
Print arr(3,2);arr(3,4)
End Sub
arr(3,2)=0
arr(3,4) =13