首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3:b :4:c =5
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3:b :4:c =5
admin
2010-03-30
25
问题
单击命令按钮时,下列程序的执行结果是 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
答案
4
解析
此题程序代码中用了嵌套调用,我们对这样的问题要多加小心,不能掉以轻心,千万不要把实参和相对应的形参弄混淆。主调过程Command1_ Click输出的是SecProc(c,b,a)的返回值,调用过程 SecProc时,主调过程分别把实参c、b、a地址传给形参 x、y、z,此时在过程SecProc中,SecProc;FirProc(a,c,B)+7。由此看出,程序段执行此语句时,将调用过程Fir Proc。把实参a,c,b的地址分别传给形参x、y、z,此时在过程FirProc中,FirProc=2*x+y+3*z+2,所以FirProe(a,c,b)=6+4+15+2=27,SecProc(a,c, b)=27+3+7=37。
转载请注明原文地址:https://kaotiyun.com/show/Ei1p777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
Java程序可以分为Application和Applet两大类,能在WWW浏览器上运行的是【】。
在以下()情况下,线程就进入可运行状态。
程序文件的编译错误分为语法错误和【】两类。
编译和执行以下代码,输出结果是()。inti=1;switch(i){case0:System.out.print("zero,");break;case1:System
在Applet中显示文字、图形等信息时,应使用的方法是()。
软件测试是为了【】而执行程序的过程。
下列选项中属于Java核心包的是()。
程序设计语言的基本成分是数据成分、运算成分、控制成分和()。
在面向对象方法中,对象可看成是属性(数据)以及这些属性上的专用操作的封装体。封装是一种【】技术。
随机试题
显示企业人员结构比例的视图是
“心不在焉,则黑白在前而不见,擂鼓在侧而不闻”说明人的心理活动过程离不开()
下列哪种组织和界面的回声最弱:
二尖瓣狭窄的杂音听诊特点不包括
昌达公司为股份有限公司,属于高危行业企业,适用的增值税税率为17%,2014年确认的利润总额为20000万元,2014年销售价格中均不含增值税税额。2014年度的财务报告于2015年3月31日批准报出。该公司2014年和2015年发生的一些交易和事项及其
下列有关持有至到期投资的处理方法中,正确的有()。
下列关于人力资源的叙述不正确的是()。
照顾到个别学生也是教师上好一节课的标准。()
WhydidthegirlinviteUncleSmithtodinner?
无可否认,他是对的。
最新回复
(
0
)