首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个命令按钮,其名称为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
2010-11-20
26
问题
在窗体上画一个命令按钮,其名称为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://jikaoti.com/ti/Z5O0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
对编写程序而言,Socket的工作过程不同的是
给出下列代码,则数组初始化中哪项是不正确的?byte[]array1,array2[];bytearray3[][];byte[][]array4;
Java中,可以通过建立java.lang.______类或其子类的实例创建和控制线程。
Java简单性首先表现在自身系统的精练,它的基本解释程序和【】占内存40KB,附加的基本标准类库和支持线程程序占175KB。
下列叙述中,不属于数据库系统的是
现在有JavaApplet小程序的源程序文件MyApplet.java,编译后生成的字节码文件为MyApplet.class,对应的HTML文件为MyApplet.html。查看该小程序的运行结果两种方式:运行命令【】;直接用浏览器打开MyApple
两个或两个以上模块之间关联的紧密程度称为()。
设有声明语句 Dimb(-1To10,2To9,20)AsInteger 则数组b中全部元素的个数
为了使图片框的大小可以自动适应图片的尺寸,则应_______。
数据处理的最小单位是______。
随机试题
溶血性链球菌感染所形成的脓液为
Internet是由什么发展而来的?
实施建筑工程监理前,建设单位应当将_________书面通知被监理的建筑施工企业。()
()是指为建筑消火栓给水系统、自动喷水灭火系统等水灭火系统提供可靠的消防用水的供水系统。
购入材料时支付的增值税和进口关税均应计入采购成本。()
张红去商场购买自行车,见商场摆放有20辆同一型号的自行车。张红从中挑选了一辆。张红付款时突接电话,被告知有急事,需马上离开。于是,张红与营业员商定:先付款,第二天来取自行车。当夜,安保人员疏忽大意未锁大门致商场发生盗窃案,5辆自行车被盗(其中包括张红挑选并
某涂料生产公司甲为增值税一般纳税人,2020年7月发生如下业务:(1)5日以直接收款方式销售涂料取得不含税销售额350万元;以预收货款方式销售涂料取得不含税销售额200万元,本月已发出销售涂料的80%。(2)12日赠送给某医院20桶涂料
货币发挥支付手段的职能表现在()。
在仪表礼仪中,男导游如果着西装,必须注意的问题有()。
PrisonStudiesA)Manywhotodayhearmesomewhereinperson,orontelevision,orthosewhoreadsomethingI’vesaid,willthink
最新回复
(
0
)