题目内容

下列子过程的定义语句中,正确的是( )。

A. Dim mySub as Sub(n%)
B. Sub mySub%(ByVal n As Integer)
C. Sub mySub(ByRef n%) As Integer
D. Sub mySub(ByVal n%)

查看答案
更多问题

若已经编写一个Sort子过程,在该工程中有多个窗体,为了方便调用Sort子程序,应该将子过程放在()中

A. 工程
B. 标准模块
C. 窗体模块
D. 类模块

单击命令按钮时,下列程序代码的运行结果为()。Public Sub Procl(ByVal n As Integer, m As Integer)n = n Mod 10m = m \ 10End SubPrivate Sub Command1_Click()Dim x As Integer, y As Integerx = 23y = 65Call Procl(x, y)Print x; yEnd Sub

A. 3 60
B. 0 65
C. 3 65
D. 23 6

在窗体上添加一个命令按钮Command1,编写代码如下:Function f(x As Integer)x = x + 3f = xEnd FunctionPrivate Sub Command1_Click()Dim a(10) As IntegerDim x As IntegerFor i = 1 To 10a(i) = 8 + iNextx = 2Print a(f(x) + x)End Sub程序运行后,单击命令按钮,显示结果为()。

A. 15
B. 17
C. 12
D. 18

设有如下程序代码:Private Function Fc(ByVal n As Integer) As IntegerFc = n * Fj(5)End FunctionPrivate Function Fj(ByVal n As Integer) As IntegerFj = n + 3End FunctionPrivate Sub Command1_Click()Dim a As Integera = 3Form1.Print Fc(a)End Sub程序时单击命令按钮,在窗体上输出的结果为( )。

A. 24
B. 5
C. 3
D. 15

答案查题题库