首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x
admin
2009-01-15
39
问题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal 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
答案
1
解析
函数Func(3,4)的返回值为3,故c的值为3。由于参数x是按值传递的,a的值仍为3;而参数y是按地址传递的,b的值变为3*4。
转载请注明原文地址:https://jikaoti.com/ti/z480FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
Java解释器采用生成与体系结构无关的______指令的技术,只需安装Java运行系统,就可保证Java程序在网络的任何地方运行。
下面是一个Applet程序,其功能是统计输入字符串中的每个字符在该串中出现的次数。要求,窗口中有一个文本框作为输入,一个按钮,点击则进行统计,统计结果以图形方式输出。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结
请完成下列Java程序:查找一个矩阵中的鞍点,对于一个二维数组中的鞍点,该点位置上的元素在该行上最小,在该列上最大,也可能没有鞍点。数组大小为4行5列。注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。
请完成下列Java程序。程序的执行结果是生成一个具有一个按钮的窗体,并且按钮的标签是“欢迎参加全国计算机等级考试—Java部分!”字样。注意:请勿改动main()主方法和其他已有的语句内容,仅在下划线处填入适当的语句。impo
下面是一个Applet程序,其功能是将完整的图像显示于Applet的区块中,然后可以通过拖动鼠标让图像随着鼠标拖动的轨迹而移动。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结构,不得增行或删行。源程序文件
软件概要设计的主要任务就是_______。
对于构造方法,下列叙述正确的是()。
在AWT包中,创建一个具有10行,45列的多行文本区域对象ta的语句为【】。
在面向对象方法中,类之间共享属性和操作的机制称为【】。
对软件设计的最小单位(模块或程序单元)进行的测试通常称为______测试。
随机试题
目前广泛应用于图书、期刊和报纸的印刷方式是()。
抢救急性有机磷农药中毒清洗皮肤时用()
下列除哪项外,均是导致痹证的外邪
三级评价项目大气环境监测点布置以监测期所处季节的主导风向为轴向,取上风向为0°,至少在约()方向上各设置1个监测点,主导风向下风向应加密布点。
保证人是指银行认可的,具有()的法人、其他经济组织或自然人。
(2016年)乙公司是一家机械制造企业,适用的所得税税率为25%。公司现有一套设备(以下简称旧设备)已经使用6年,为降低成本,公司管理层拟将该设备提前报废,另行购建一套新设备。新设备的投资于更新起点一次性投入,并能立即投入运营。设备更新后不改变原有的生产能
某居民企业,2017年财务资料如下:收入合计60万元,成本费用合计30万元,经税务机关核实,企业未能正确核算成本费用,收入核算正确,税务机关对企业核定征收企业所得税,应税所得率为15%,2017年应纳企业所得税()万元。
根据左图规律,右图“?”处应为()。
根据《国家赔偿法》第30条的规定,赔偿义务机关对受害人名誉权、荣誉权造成损害的,在给予赔偿的同时,还应当按照适当的价值,以赔偿金的方法给予赔偿。( )
关于分布式拒绝服务的描述中,正确的是()。
最新回复
(
0
)