[单项选择题] 单击命令按钮时,下列程序的执行结果为( )。  Private Sub Command1_Click()   Dim a As Integer,b As Integer,c As

18 查阅

[单项选择题] 单击命令按钮时,下列程序的执行结果为( )。  Private Sub Command1_Click()   Dim a As Integer,b As Integer,c As Integer   a=2:b=3:C=4    Print P2(c,b,A)   End Sub  Private Function P1(x As Integer,y As Integer,z As Integer)   P1=2 * X + y + 3 * z  End Function  Private Function P2(x As Integer,y As Integer,z As Integer)   P2=P1(z,x,y) + X  End Function

A.21

B.19

C.17

D.34

参考答案:

A

对于多个过程或函数依次调用和处理与简单过程调用处理一样,本题先调用函数P2,而函数P2又调用函数P1,结果返回的顺序是从P1到P2,P2计算后输出到调用的地方。

计算机考试