题目内容

有如下的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

在窗体上画一个名称为Command1的命令按钮,编写以下程序: Private Sub Command1_Click() Dim n As Integer n = 2 sub1 n End Sub Private Sub sub1(x As Integer) x = x * 2 + 1 If x < 10 Then sub1 (x) End If x = x * 2 + 1 Print x, End Sub 程序运行后,单击该命令按钮,窗体上显示的是( )。

A. 23 47
B. 47
C. 23 11
D. 11

运行程序,单击窗体后输出结果是( )。 Public Sub swap(x As Integer, y As Integer) t = x: x = y: y = t End Sub Private Sub Form_Click() Dim m As Integer, n As Integer m = 10: n = 30 swap (m), (n) Print m; n End Sub

A. 30 10
B. 10 10
C. 30 30
D. 10 30

答案查题题库