首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As integer Private Sub Command1_Cliek( ) x=10
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As integer Private Sub Command1_Cliek( ) x=10
admin
2010-03-22
30
问题
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As integer Private Sub Command1_Cliek( ) x=10 Call s1 Call s2 MsgBox x End Sub Private Sub s1 ( ) x = x+20 End Sub Private Sub s2 ( ) Dim x As integer x =x +20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
选项
A、10
B、30
C、40
D、50
答案
D
解析
由于x为全局变量,故在调用s1、s2两个过程时,x的值发生变化后,仍为全局有效,因此最后x的取值为50。
转载请注明原文地址:https://kaotiyun.com/show/xZwp777K
本试题收录于:
二级Access题库NCRE全国计算机二级分类
0
二级Access
NCRE全国计算机二级
相关试题推荐
有如下类定义:classPet{charname[30];public:Pet(char*n){strcpy(name,n);}voidbark(){co
下列叙述中正确的是()。
对长度为n的线性表排序,在最坏情况下,比较次数不是n(n-1)/2的排序方法是( )。
设循环队列为Q(1:m),其初始状态为front=rear=m。经过一系列入队与退队运算后,front=30,rear=10。现要在该循环队列中作顺序查找,最坏情况下需要比较的次数为()。
对长度为n的线性表排序,在最坏情况下,比较次数不是n(n一1)/2的排序方法是()。
if语句的语法格式可描述为:格式1:if()或格式2:if()else关于上面的语法格式,下列表述中错误的是()。
如果派生类以protected方式继承基类,则原基类的protected成员和public成员在派生类中的访问属性分别是()。
使用VC6打开考生文件夹下的源程序文件modi2.cpp。阅读下列函数说明和代码,完成空出部分程序。函数fun(intN[41)的功能是用4个数字,组成互不相同且无重复数字的三位数,并将满足所有条件的数字输出到屏幕,并且每输出一个三位数字就换一行。
数据流程图(DFD)是()。
用于显示消息框的宏命令是
随机试题
选择滚动轴承的配合种类时,应考虑负荷的大小、方向和性质,转速的高低、旋转精度的高低,以及拆卸是否方便等一系列因素。当负荷方向不便时,大多数情况下内圈常取( )配合。
空腹听诊出现振水音,可见于()
关于经行情志异常心血不足证临床表现,正确的是
男,55岁。因急性阑尾炎穿孔入院。行阑尾切除术后第6天,出现发热,体温上升至39.0℃,伴有腹泻及里急后重。查体:心肺未见明显异常,手术切口无红肿、渗出。此时首选的检查是
现在大脑研究者开始把脑看作一种全息图。全息图是一种新的摄影方法。在全息图的任何一个组成部分中,都包含了整个全息图的信息,并由此显示出一种非常逼真的、三维立体图像。例如,把一张关于桌子的全息照片粉碎,你可以发现在每碎片上所显示的图像并不是桌子的一部分而是整个
把下面的六个图形分为两类,使每一类图形都有各自的共同特征或规律,分类正确的一项是:
毛泽东的《在延安文艺座谈会上的讲话》发表于()。
A、 B、 C、 D、 A
下列程序intx=—5,y=0;while(++x)y++;cout<<y<<end1;执行后,输出的结果是(),
Whatwillthewomandotomorrow?
最新回复
(
0
)