[单项选择题] 设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function

12 查阅

[单项选择题] 设有如下通用过程:

Public Function f(x As Integer)

Dim y As Integer

x=20

y=2

f=x*y

End Function

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:

Private Sub Command1_Click()

Static x As Integer

x=10

y=5

y=f(x)

Print x;y

End Sub

程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。

A.10 5

B.20 5

C.20 40

D.10 40

参考答案:

C

计算机考试