首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3∶b=4∶c=5 Print SecProc(c, b,
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3∶b=4∶c=5 Print SecProc(c, b,
admin
2010-11-20
33
问题
单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
a=3∶b=4∶c=5
Print SecProc(c, b, a)
End Sub
Function FirProc(x As Integer, y As Integer, z As Integer)
FirProc=2 * x + y + 3 * z+2
End Function
Function SecProc(x As Integer, y As Integer, z As Integer)
SecProc=FirProc(z, x, y)+ x+7
End Function
选项
A、20
B、25
C、37
D、32
答案
C
解析
此题程序代码中用了嵌套调用,我们对这样的问题要多加小心,不能掉以轻心,千万不要把实参和相对应的形参弄混淆。主调过程Command1_Click输出的是SecProc(c,b,a)的返回值,调用过程SecProc时,主调过程分别把实参数c,b,a地址传给形参想,x,y,z,此时在过程SecProc中,SecProc=FirProc(a,c,b)+7。由此看出,程序段执行此语句时,将调用过程FirProc。把实参啊,a,b,c地址分别传给形参x,y,z,此时在过程FirProc中,FirProc=2*x+y+3*z=2,所以FirProc(a,c,b)=6+4+15+2=27,SecProc(a,c,b)=27+3+7=37。
转载请注明原文地址:https://jikaoti.com/ti/17g0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
若某链表最常用的操作是在最后一个结点之后插入一个结点或删除最后一个结点,则采用______存储方式最节省时间。
下列关于字符串的叙述错误的是( )。
下列不属于虚拟机执行过程的特点的是
在数据结构中,从逻辑上可以把数据结构分成()。
顺序执行下列程序语句后,则b的值是Stringa="Hello";Stringb=a.substring(0,2);
下列关于线程优先级的说法有误的是
下列程序中,给出两个整数2和3,分别求2除以3和2乘以3的结果,要求调用类ex19_1的方法method()来输出相应的结果,请将程序补充完整。程序运行结果如下。0.66666666666666666源程序文件代码清单如下:
下列构造方法的调用方式中,正确的是()。
下列关于J2EE的特点的说法中,错误的是( )。
一般在数据流程图中,圆圈用来表示______。
随机试题
光谱分析中,当热导池检测器的桥路电流和钨丝温度一定时,适当降低池体温度,可以提高灵敏度。()
下列对象可以申请注册的有()
管理报表
先天性髋关节脱位临床分期__________和__________。
我国的助残日是
硫脲类药物最常见的不良反应是
居住小区管网漏失水量及未预见用水量之和可按最高日用水量的()计。
建设工程项目管理的内涵是:自项目开始至项目完成,通过项目策划(ProjectPlanning)和项目控制(ProjectControl),以使项目的()得以实现。
各单位每年形成的会计档案,都应由会计机构按照归档的要求,负责整理立卷,装订成册,编制()。
某塑胶企业在本市晚报上作虚假广告,声称提供质优价廉的塑钢门窗。李林看到广告后,按照晚报上提供的电话,买了一套塑钢门窗。哪知没用几日就出现断裂现象。以下对于李林实现自己的权利的方式说法正确的是()。
最新回复
(
0
)