首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() BT 4 End Sub Private Sub BT(x As Integer) x=x*2+1 If x<6 Then Call BT(x) End If
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() BT 4 End Sub Private Sub BT(x As Integer) x=x*2+1 If x<6 Then Call BT(x) End If
admin
2010-11-20
31
问题
单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click()
BT 4
End Sub
Private Sub BT(x As Integer)
x=x*2+1
If x<6 Then
Call BT(x)
End If
x=x*2
Print x;
End Sub
选项
A、15
B、16
C、17
D、18
答案
D
解析
此题在函数调用过程中采用了简单递归的方式,具体流程如下:主调过程调用BT过程,把实参4传递给BT过程中的形参x,由x=x*2+1语句推出x=9,此时不满足BT过程中判断语句的判断条件,执行x=x*2;Print x;语句。由x=x*2语句得到x值为18并输出,结束此次调用过程,返回到主调过程结束程序,输出结果为18。
转载请注明原文地址:https://kaotiyun.com/show/hpmp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
用来导入已定义好的类或包的语句是【】。
下列哪些内容是异常的含义?
顺序执行下列程序语句后,则b的值是Stringa="Hello";Stringb=a.substring(0,2);
下列关于链式存储的叙述中错误的是()。
下列对队列的叙述中正确的是( )。
在关系数据库中,用来表示实体之间联系的是______。
下列关于正则表达式的说法,不正确的是
Java程序的执行过程中用到一套JDK工具,其中javap.ext是指()。
软件工程的理论和技术性研究的内容主要包括软件开发技术和()。
在软件工程中,白箱测试法可用于测试程序的内部结构。此方法将程序看做是_______。
随机试题
王某家住甲县,在乙县生产伪劣商品经过丙县运输到丁县进行销售,有权对王某的违法行为进行处罚的机关有()。
在宏观细分变量中,()可能是进行组织市场细分最基本、最常用的一个细分变量。
W:AmanfromAT&Twouldliketotalkwiththemanageronthenewproject.Issheavailable?M:______
儿童的胸腺、淋巴结、间质性淋巴组织等淋巴组织,在12岁左右可达成人的
菌斑微生物作为牙周病始动因子的最有力证据是
黏液表皮样癌的病理特征有()。
对于盘盈的材料经批准后冲减( )。
下列图形中最适合于描述结构性问题的是()。
()是以所有权发生转移的不动产为征税对象,向产权承受人征收的一种财产税。
Thetownitselfisdreary:notmuchisthereexceptthecottonmill,thetwo-roomhouseswheretheworkerslive,afewpeachtre
最新回复
(
0
)