问题:

(单项选择题)单项选择题:下列Visual Basic程序的执行结果是什么?

Private Sub Command1_Click()

Dim x As Integer, y As Integer

x=12:y=20

Call Value(x, y)

Print x; y

End Sub

Private Sub Value(ByVal m As Integer, ByVal n As Integer)

m=m * 2:n=n-5

Print m; n

End Sub

  • A.20 12
    20 15
  • B.12 20
    12 25
  • C.24 15
    12 20
  • D.24 12
    12 15

提问:

请问在上述Visual Basic程序中,当调用Value过程后,x和y的值分别是多少?这个问题的重点是考察什么知识点?这个章节的主要内容是什么?

复习要点:

理解Visual Basic中过程调用的参数传递机制,特别是ByVal关键字的使用,以及它如何影响变量的值。

查阅资料方向:

查阅关于Visual Basic中过程和函数调用的资料,特别是参数传递的机制和ByVal与ByRef的区别。

可能感兴趣的题目: