首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个Command1命令按钮,还有以下程序代码: Private Sub Command1_Click() Static x As Integer x = x + 1 Call proc(x) Print x, E
设窗体上有一个Command1命令按钮,还有以下程序代码: Private Sub Command1_Click() Static x As Integer x = x + 1 Call proc(x) Print x, E
admin
2019-03-14
22
问题
设窗体上有一个Command1命令按钮,还有以下程序代码:
Private Sub Command1_Click()
Static x As Integer
x = x + 1
Call proc(x)
Print x,
End Sub
Private Sub proc(a As Integer)
Static x As Integer
x = x + a
a = x
End Sub
程序运行后,3次单击命令按钮,则产生的输出是
选项
A、1 2 3
B、1 3 5
C、1 3 7
D、2 4 6
答案
C
解析
注意Static关键字修饰的变量,在过程退出后,变量值保持不变。选C)。
转载请注明原文地址:https://jikaoti.com/ti/Esm0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下列关于利用通用对话框产生的文件对话框的相关属性的描述中,错误的是( )。
下列关于菜单项的描述中,错误的是
设a=4,b=5,c=6,执行语句Printa
(1)在考生文什央下有一个工程文件sjt3.vbp,窗体上有一个圆和一个矩形,还有水平和垂直滚动条各一个。程序运行时,移动某个滚动条的滚动块,可使圆做相应方向的移动。滚动条刻度值的范围是圆可以在矩形中移动的范围。以水平滚动条为例,滚动块在最左边时,圆靠在矩
以下关于窗体的叙述中,错误的是
设有表达式:A=IIf(x>y,"go","back")。以下与该表达式具有相同功能的语句是
下面不能作为软件需求分析工具的是
窗体上有一个Text1文本框和一个Command1命令按钮。程序的功能是在文本框中输入密码后单击命令按钮则进行密码确认,若密码正确,弹出信息框显示"密码正确",若密码错误,弹出信息框显示"密码错误,请重新输入",但最多允许输出3次,若还不正确,则弹出信息框
某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是
对下列二叉树进行前序遍历的结果为()。
随机试题
20×6年1月1日,经股东大会批准,甲公司向50名高管人员每人授予1万份股票期权。根据股份支付协议规定,这些高管人员自20×6年1月1日起在甲公司连续服务3年,即可以每股5元的价格购买1万股甲公司普通股。20×6年有1名高管人员离开公司,甲公司预计在未来两
HowtoTametheAngerMonsterThreefactorscausingangertime—atwork:—longerworkinghoursand【L1】________
疟疾发作停止,但血中疟原虫未完全消灭,遇机体免疫力低下时,疟原虫再度繁殖,引起临床发作者称初发疟疾停止后,血中疟原虫已完全消失,遇机体免疫力低下时,又出现疟原血症或症状者称
十二指肠引流液中不含有
关于明龙骨吊顶龙骨安装的说法,正确的有()。
A公司2×12年发生的有关交易或事项如下:(1)接受其他企业的现金捐赠100万元;(2)购入一项生产经营用固定资产,支付价款250万元,当期计提累计折旧50万元;(3)以120万元的价格处置一项长期股权投资,确认投资收益35万元;(4)平价发行债券收到现金
求助者一般资料:小刘,男,28岁,某公司程序员。求助者主诉:由于该求助者的工作原因,求助者一直没有女朋友,一年以前在QQ聊天的时候与一个女孩聊得比较投机,双方互相有好感,就发展为男女朋友。后来该女孩以小刘没有钱为由提出分手。自此以后小刘就认为现在
下列表述正确的是()。
设二阶线性微分方程y"+p(x)y’+q(x)y=f(x)有三个特解y1=ex,y2=ex+,y3=ex+e—x,则该方程为_________.
Eachofmychildren______toadifferentschool.
最新回复
(
0
)