首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个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
2020-02-27
21
问题
设窗体上有一个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://kaotiyun.com/show/ZGTp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
某完全二叉树按层次输出(同一层从左到右)的序列为ABCDEFGH。该完全二叉树的前序序列为()。
在黑盒测试方法中,设计测试用例的根据是()。
对软件系统总体结构图,下面描述中错误的是()。
下列叙述中正确的是()。
关系数据模型的三个组成部分中不包括()。
在考生文件夹下有一个工程文件sjt5.vbpc,其窗体中有2个标题分别为“读数据”和“查找水仙花数”的命令按钮。请画1个名称为Text1、初始值为空的文本框,该文本框允许显示多行内容,且有垂直滚动条,如图所示。程序功能如下:(1)考生文件夹下in5.
(1)在名称为Form1的窗体上添加—个名称为Text1的文本框,再建立一个名称为Format的弹出式菜单,含三个菜单项,标题分别为“加粗”、“斜体”、“下划线”,名称分别为M1、M2、M3。请编写适当的事件过程,在程序运行时,当用鼠标右键单击文本框时,弹
一个工作人员可以使用多台计算机,而一台计算机可被多个人使用,则实体工作人员与实体计算机之间的联系是( )。
在窗体Form1上放一个名为Text1的文本框和一个名为Command1的命令按钮,然后编写一个事件过程。要求程序运行后,如果在文本框中输入一个字符,则把命令按钮的标题设置为“VB等级考试二级”。以下能正确实现上述操作的事件过程是()。
如下关于变体类型变量的叙述中,错误的是( )。
随机试题
下列对蜜丸的贮存操作哪个是不正确的( )。
宋某,女,67岁,因右侧肢体活动不利2天就诊。患者平素时常感体倦乏力,头目眩晕等一年有余。昨天晨起突然不适,随之出现右侧肢体活动不便,语言不利,口眼渐形歪斜,遂来院治疗。刻诊:右侧偏身麻木,肢软无力,口眼歪斜,语言寒涩,口角流涎,小便频繁,饮食尚可,大便稠
以下为不同住宅楼楼板的规范化撞击声压级值Ln,隔声效果最好的是()。
商业大街内的废物箱之间的间隔应设置为()m。
当山坡上的填方路基有沿斜坡下滑倾向时应采用()。
【2008年真题】根据我国现行规定,对于生产单一产品的项目,一般以()划分项目等级。
给定资料1.2014年2月,习近平总书记在中央政治局第十三次集体学习时强调,培育和弘扬社会主义核心价值观是“凝魂聚气、强基固本的基础工程”,是一个复杂长期的过程。这一过程,求实是基础,效果是目标,就是要讲求实效。“夫济大事必以人为本。”
设有员工实体Employee(employeeID,name,sex,age,tel,departID),其中employeeID为员工号,name为员工姓名,sex为员工性别,age为员工年龄,tel为员工电话(要求记录该员工的手机号码和办公室电话),d
Supermarketshoppershaveneverbeenmorespoiltforchoice.Butjustwhenwethoughttraditionalsystemsofselectivefanningh
保护边境
最新回复
(
0
)