题目内容

下面定义模块级变量a的语句中错误的是()。

A. Dim a%
B. Private a%
C. Private a As Integer
D. Static a%

查看答案
更多问题

窗体上有一个名称为Command1的命令按钮,其中部分代码如下:Private Sub Command1_Click()Dim a(10)As IntegerDim n As Integer……Call calc(a,n)……End Subcalc过程的首行应该是()。

A. Sub calc(x() As Integer, n As Integer)
B. Public Sub calc(x() As Integer)
C. Private Sub calc(a(n) As Integer, n As Integer)
D. Public Sub calc(a As Integer, n As Integer)

设有如下程序:Sub f(x As Integer, ByVal y As Integer)x=2*xy=y+xEnd SubPrivate Sub Command1_Click()Dim a As Integer, b As Integera=6:b=35Call f(a, b)Print a, bEnd Sub程序运行后,单击命令按钮Command1,输出结果为()。

A. 647
B. 1247
C. 635
D. 1235

设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下:Private Sub Command1_Click()Static x As Integerx=f(x+5)ClsPrint xEnd SubPrivate Function f(x As Integer)As Integerf=x+xEnd Function连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是()。

A. 10
B. 30
C. 60
D. 70

有如下过程代码:Sub var_dim()Static numa As IntegerDim numb As Integernuma=numa+2numb=numb+1print numa;mumbEnd Sub连续3次调用var_dim过程,第3次调用时的输出是()。

A. 21
B. 23
C. 61
D. 63

答案查题题库