单选题
单出命令按钮执行以下程序,输出结果为
____
。
Private Sub Command1_Click()
Dim x As Integer,y As Integer
x=12:y=32
Call Proc(x,y)
Print x;y
End Sub
Public Sub Proc(n As Integer,ByVal m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
A、
12 32
B、
2 32
C、
2 3
D、
12 3
【正确答案】
B
【答案解析】
[解析] 本题考查过程调用中的参数传递。参数传递时默认为地址传递,如果实参为常量或者形参加上ByVal关键字说明,则为传值传递。本题中第一个参数为地址传值传递,第二个参数为传递,因此调用以后x值为2,而y不变。
提交答案
关闭