有一子程序定义为Public Sub p(a As Integer, b As Integer),正确的调用语句是( )。
A. sub 2, 3.5
B. Call p 2, 3.5
C. p 2, 3.5
D. Call sub(2, 3.5)
查看答案
运行程序,单击窗体后输出结果是( )。 Sub test(x%, y%, z%) x = 7: y = 5: z = 9 End Sub Private Sub Form_Click() Dim a%, b% a = 3: b = 8 Call test(a - 1, a, (b)) Print a; b End Sub
A. 3 8
B. 5 8
C. 6 8
D. 5 9
设窗体上有一个Command1命令按钮,还有以下程序代码: Private Sub Command1_Click() Static x As Integer x = x + 1 Call proc(x) Print x, End Sub Private Sub proc(a As Integer) Static x As Integer x = x + a a = x End Sub 程序运行后,3次单击命令按钮,则产生的输出结果是( )
A. 1 2 3
B. 1 3 7
C. 2 4 6
D. 1 3 5
运行程序,单击窗体后输出结果是( )。 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)