首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(By Val x As Integer, Y As Integer) y=x*y If y>0 Then
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(By Val x As Integer, Y As Integer) y=x*y If y>0 Then
admin
2013-04-11
27
问题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(By Val x As Integer, Y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click() Dim a As Integer, b As Integer a=3 b=4 c=Func(a,b)Print" a="; a Print" b="; b Print" c="; c End Sub 程序运行后,单击命令按钮,其输出结果为______。
选项
A、a=3 b=12 c=3
B、a=3 b=4 c=3
C、a=3 b=4 c=12
D、a=13 b=12 c=12
答案
A
解析
函数Func(3,4)的返回值为3,故c的值为3。由于参数x是按值传递的,a的值仍为3:而参数y是按地址传递的,b的值变为3*4。
转载请注明原文地址:https://kaotiyun.com/show/Xihp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程:PrivateSubCommand1_click()DimiAsInteger,nAsIntegerFo
下列哪项是窗体对象的方法而不是属性______。
文件根据数据性质,可分为【】文件和【】文件。
一个控件在窗体上的位置由Top和Left属性决定,其大小由【】和【】属性决定。
把窗体的KeyPreview属性设置为True,并编写如下两个事件过程:PrivateSubForm_KeyDown(KeyCodeAsInteger,ShiftAsInteger)PrintKeyCode;En
设用复制、粘贴的方法建立了—个命令按钮数组Command1,以下对该数组说法错误的是
为了能自动放大或缩小图像框中的图形以与图像框的大小相适应,必须把该图片框的Stretch属性设置为【】。
SQL语言中的“视图”(View)对应于数据库三级模式结构中的______。
在所有排序方法中,关键字比较的次数与记录的初始排列次序无关的是______。
索引属于()。
随机试题
阅读《香市》中的片段,然后回答问题。在我看来,这所谓“南洋武术班”的几套把式比起从前“香市”里的打拳头卖膏药的玩意来,委实是好看得多了。要是放在十多年前,怕不是挤得满场没个空隙儿么?但是今天第一天也只得二百来看客。往常“香市”的主角——农民,今天
男,38岁,间歇性浮肿10余年,伴恶心、呕吐1周。查血红蛋白80g/L,血压20.7/14.7kPa(155/110mmHg),尿蛋白++,颗粒管型2~3个/HP,尿比重1.010~1.012为了解该患者双侧肾脏是否已缩小,应首选的检查是
A.Ⅰ型和Ⅱ型B.急性心房颤动C.阵发性、持续性和永久性D.常见型和少见型E.单源性和多源性心房扑动分类为
A.香砂六君子汤合当归补血汤B.归脾汤C.八珍汤合无比山药丸D.化虫丸合八珍汤E.桃红四物汤贫血虫积证,治疗应首选的方剂是
机械台班单价组成内容有()。
某市中心区新建一座商业中心,建筑面积26000m2,地下2层,地上16层,1至3层有裙房,结构形式为钢筋混凝土框架结构,柱网尺寸为8.4m×7.2m,其中二层南侧有通长悬挑露台,悬挑长度为3m。施工现场内有一条10kV高压线从场区东侧穿过,由于该10kV高
市场风险控制的主要方法有()。I.资产证券化Ⅱ.限额管理Ⅲ.风险对冲Ⅳ.经济资本配置
犹太王大卫在戒指上刻有一句铭文:“一切都会过去。”契诃夫小说中的一个人物在戒指上也刻有一句铭文:“一切都不会过去。”这两句寓有深意的铭文,引起了你怎样的思考?自选角度,自拟题目,写一篇文章。要求:(1)不少于800字;
下列政府机构中有权以“条例”命名的立法活动的主体有()。
一台具有1024×768分辨率、可显示65536种颜色的显示器,其显示适配器(显示卡)上显示存储器容量的配置为( )。
最新回复
(
0
)