网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
编写如下事件过程: 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
参考答案
更多 “ 编写如下事件过程: 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.6B.12C.24D.47 ” 相关考题
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Sub BTC(oldCopy() As Integer, newCopy() As Integer)Dim i As IntegerFor i=LBound(oldCopy() ) To UBound(oldCopy() )newCopy(i) =oldCopy(i)Next iEnd SubPrivate Sub Command1_Click()Dim m(10) As Integer, n(10) As IntegerFor i=1 To 10m(i) =i iNext iCall BTC(m, n)Print n(5)End Sub程序运行后,单击命令按钮输出结果为( )。A.0B.2C.10D.25
考题
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮。然后编写如下的事件过程: Private Sub Commandl_Click() Dim arr(5)As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是______。A. 30B.25C.20D.15
考题
若在窗体设计过程中,命令按钮CornmanelO的事件属性设置如下图所示,则含义是A.只能为“进入”事件和“单击”事件编写事件过程B.不能为“进入”事件和“单击”事件编写事件过程C.“进入”事件和“单击”事件执行的是同一事件过程D.已经为“进入”事件和“单击”事件编写了事件过程
考题
如果存在如下过程:Private Function Fun(a() As Integer)Dim First As Integer, Last As Integer, i As IntegerFirst=LBound(a)Last=UBound(a)Max=a(First)For i=First To LastIf a(i) Max Then Max=a(i)NextFun=MaxEnd Function在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()ReDim m(1 To 4) As Integerm(1)=20: m(2)=30: m(3)=50: m(4)=100c=Fun(m)Print cEnd Sub单击命令按钮,其输出结果为 【 】。
考题
设程序中有如下数组定义和过程调用语句: 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)
考题
若在窗体设计过程中,命令按钮Command0的事件属性设置如下图所示,则含义是( )。A.只能为“进入”事件和“单击”事件编写事件过程B.不能为“进入”事件和“单击”事件编写事件过程C.“进入”事件和“单击”事件执行的是同一事件过程D.已经为“进入”事件和“单击”事件编写了事件过程
考题
设程序中有如下数组定义和过程调用语句: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)
考题
在窗体上画一个命令按钮,然后编写如下事件过程: 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.0B.2C.10D.25
考题
设程序中有如下数组定义和过程调用语句: 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)
热门标签
最新试卷