编写如下程序: Private Sub Commandl-Click() Dim x As Integer x=10 Print funl(x,12)+x End Sub Private Function funl(

admin2020-01-02  28

问题 编写如下程序:
Private Sub Commandl-Click()
    Dim x As Integer
    x=10
    Print funl(x,12)+x
    End Sub
    Private Function funl(m As Integer,11 As Integer)As Integer
    If n>10 Then m=n
    funl=m+n
    End Function
程序运行后,单击命令按钮Commarid1,输出结果为(    )。

选项 A、30
B、32
C、34
D、36

答案D

解析 Function funl函数中的参数都是引用传递,会改变实参的值,执行完后Commandl-Click中变量x的值为12。选D)。
转载请注明原文地址:https://kaotiyun.com/show/PETp777K
0

相关试题推荐
随机试题
最新回复(0)