编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.6
B.12
C.24
D.47
第1题:
设程序中有如下数组定义和过程调用语句: Dim a(10)As Integer … Call D(a) 如下过程定义巾,正确的是( )。
A.Private Sub p(a As Integer)
B.Private Sub p(a( )As Integer)
C.Private Sub p(a(10)As Integer)
D.Private Sub p(a(n)As Integer)
第2题:
设程序中有如下数组定义和过程调用语句:
Dim a(10) as integer
……
Call p(a)
如下过程定义中,正确的是
A)Private Sub p(a as integer)
B)Private Sub p(a() as integer)
C)Private Sub p(a(10) as integer)
D)Private Sub p(a(n) as integer)
第3题:
设程序中有如下数组定义和过程调用语句: Dim a(10) As Integer …… Call p(a) 如下过程定义中,正确的是
A.Private Sub p(a As Integer)
B.Private Sub p(a() As Integer)
C.Private Sub p(a(10) As Integer)
D.Private Sub p(a(n) As Integer)
第4题:
若在窗体设计过程中,命令按钮Command0的事件属性设置如下图所示,则含义是( )。
A.只能为“进入”事件和“单击”事件编写事件过程
B.不能为“进入”事件和“单击”事件编写事件过程
C.“进入”事件和“单击”事件执行的是同一事件过程
D.已经为“进入”事件和“单击”事件编写了事件过程
第5题:
在窗体上画一个命令按钮,然后编写如下事件过程: Sub BTC(old Copy( ) As Integer,new Copy( ) As Integer) Dim i AS Integer For i=LBound(oldCopy( ))To UBound(oldCopy( )) newCopy(i)=oldCopy(i) Next i End Sub Private Sub Command1 _ Click( ) Dimm(10) As Integer,n(10)As Integer For i=1 To 10 m(i) =i*i Next i Call BTC(m,n) Print n(5) End Sub 程序运行后,单击命令按钮输出结果为
A.0
B.2
C.10
D.25