首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
单击命令按钮时,下列程序的执行结果是 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
15
问题
单击命令按钮时,下列程序的执行结果是 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://jikaoti.com/ti/MNq0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
阅读下面Applet程序importjavax.swing.*;importjava.awt.*;publicclassSwintgAppletextendsJApplet{
switch语句中表达式(expression)的值不允许用的类型是
文件类File是【】包中的一个重要的非流类。
下列关于线程的说法中,正确的是
下列Java源程序结构中前三种语句的次序,正确的是
下面是一个Applet程序,其功能是计算山顶的高度,计算方法是:该山顶由a点量得仰角度数为a度,由b点量得仰角度数为b度,且测得a,b点之间的距离为c米,求山的高度。要求窗口中有3个输入框,分别作为a,b,c的输入,一个按钮点击后进行计算,结果显示在另一个
算法的复杂度主要包括【】复杂度和空间复杂度。
Java语言中提供处理不同类型流的类包是()。
软件工程研究的内容主要包括:【】技术和软件工程管理。
AWT中用来表示对话框的类是
随机试题
可转位铣刀属于__________刀具。
循环冷却水如何防止结垢?
下列选项中,强调外因在事物发展中起着重要作用的是()。
A、IgGB、IgMC、IgED、SIgAE、IgD局部抗感染的免疫球蛋白是
《突发公共卫生事件应急条例》第二十条规定,突发事件监测机构、医疗卫生机构和有关单位发现有本条例第十九条规定情形之一的,应当向所在地县级人民政府卫生行政主管部门报告的时限是
1980年开始对250名心绞痛病人进行随访,至1985年底,获得其中200名病人的随访资料。在这200名病人中26%死亡,20%病情加重,54%病情无变化。研究者据此认为心绞痛病人5年生存率为74%。该结论
电算化会计核算流程中的记账特点包括()。
“文化霸权”最先是由()提出的。
Aninternetisacombinationofnetworksconnectedby(71).Whenadatagramgoesfromasourcetoa(72),itwillprobablypas
UNIFACE是关键性业务应用开发平台和运行环境,采用构件式的开发,构件分为4个层次,由低至高依次为()。
最新回复
(
0
)