题目内容

运行程序,单击窗体后输出结果是( )。 Private Sub Form_Click() Dim x%, y% x = 15: y = 10 Call f(x, y) Print x; y End Sub Private Sub f(ByVal x%, y%) x = x + y y = y + x End Sub

A. 25 10
B. 15 10
C. 25 35
D. 15 35

查看答案
更多问题

设程序中有如下数组定义和过程调用语句: Dim a(10) As Integer …… Call p(a) 以下过程定义中,正确的是( )。

A. Private Sub p(a(10) As Integer)
B. Private Sub p(a As Integer)
C. Private Sub p(a(n) As Integer)
D. Private Sub p(a() As Integer)

有如下的Sub子过程定义: Sub P(a%, b%) … End Sub 下面调用该过程正确的语句是( )。

A. P(10,20)
B. Call P 10,20
Call P
D. P 10,20

在窗体上画一个名称为Command1的命令按钮,然后编写如下代码: Public Sub S(x As Integer, y As Integer) Static z As Integer y = x * x + z z = y End Sub Private Sub Command1_Click() Dim i As Integer, y As Integer m = 0: y = 0 For i = 1 To 3 S i, y m = m + y Next Print m End Sub 程序运行后,单击命令按钮,在窗体上输出的内容是( )。

A. 7
B. 14
C. 50
D. 20

运行程序,单击命令按钮Command1后窗体上输出结果为( )。 Public Sub Fun(a(), ByVal x%) For i = 1 To 5 x = x + a(i) Next End Sub Private Sub Command1_Click() Dim arr(5), n% For i = 1 To 5 arr(i) = i Next n = 15 Call Fun(arr(), n) Print n End Sub

A. 20
B. 25
C. 15
D. 30

答案查题题库