首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=3:b=4:c=5 Print S
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=3:b=4:c=5 Print S
admin
2009-03-15
16
问题
单击命令按钮时,下列程序的执行结果是 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 End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Function
选项
A、20
B、22
C、28
D、30
答案
4
解析
此题程序代码中用了双层调用,我们对这样的问题要多加小心,不能掉以轻心,千万不要把实参和相对应的形参弄混淆。主调过程Com mand1_Click输出的是SecProc(c,b,a)的返回值,调用过程SecProc时,主调过程分别把实参c、b、a地址传给形参x、y、z,此时在过程SecProc中,SecProc=FirProc (a,c,b)+c。由此看出,程序段执行此语句时,将调用过程FirProc。把实参a、c、b的地址分别传给形参x、y、 z,此时在过程FirProc中,FirProc=2*x+y+3* z,所以FirProc(a,c,b)=6+4+15=25,SecProc(a,c, b)=25+3=28,所以选项C是正确的。
转载请注明原文地址:https://kaotiyun.com/show/KU1p777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
深度为5的满二叉树有【】个叶子结点。
下列程序中,给出两个整数4和6,分别求4除以6和4乘以6的结果,要求调用类exl的方法method()来输出相应的结果,请将程序补充完整。程序运行结果如下:0.666666666666666624注意:不改动程序结构,不得增行或删行
下列程序中,要求输出一个特定文件(这里是ex1.java)的相关信息,包括文件的名字,相对路径以及文件的长度。请将程序补充完整。程序运行结果如下:name:ex1.javapath:ex1.javalength:299
Java的数据结构类型中,正确的说法是()
下列叙述中正确的是
子类可重写父类的方法,重写时必须遵循的原则()
final属性是专门定义【】变量的保留字。
param可选标记指定applet外部参数,applet通过______方法可以获得所给属性值。
某二叉树中度为2的结点有18个,则该二叉树中有【】个叶子结点。
在软件工程中,白箱测试法可用于测试程序的内部结构。此方法将程序看做是()
随机试题
www.people.com.cn表示一个网站的__________。()
法洛四联症不包括下列哪一种畸形
治疗痄腮热毒壅盛证应首选的方剂是()
男孩,1岁。阵发性痉挛性咳嗽20余日,出生时接种卡介苗,1:20000T试验硬结直径20mm,胸片右肺门淋巴结增大,诊断为
如果电路只有电阻,短路全电流最大有效值ich为超瞬变短路电流的()。
受压纤维截面的抵抗矩是( )。当梁自重标准值为1.35kN/m,集中荷载标准值330kN,Ix=230342cm4时,跨中挠度为( )mm。
下列工程造价资料,属于按不同阶段划分的有()。
某公司拟进行股票投资,计划购买A、B、C三种股票。已知A、B股票的β系数分别为1.5、1.0,C股票收益率与市场组合收益率的相关系数为0.8,C股票的标准差为12.5%。该公司建立的投资组合中A、B、C股票的投资比重分别为50%、30%和20%。同期市场
中共“八大”最主要的贡献是()。
2011年全年,全国共计完成服装总产量436亿件,其中梭织服装(含皮革服装)146亿件:针织服装290亿件,与2010年相比分别增加0%、-0.68%、0.35%。2011年,我国服装产量前五名大省仍为广东、江苏、浙江、山东和福建省,该五省总产量占全国总
最新回复
(
0
)