首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 10 y = 20 Call fun1(x, y) Print x; y End
编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 10 y = 20 Call fun1(x, y) Print x; y End
admin
2018-09-19
21
问题
编写如下程序:
Private Sub Command1_Click()
Dim x As Integer, y As Integer
x = 10
y = 20
Call fun1(x, y)
Print x; y
End Sub
Private Function fun1(ByVal m As Integer, n As Integer) As Integer
m = m * m
n = n + n
End Function
程序运行后,单击命令按钮Command1,输出结果为
选项
A、10 25
B、10 40
C、100 25
D、100 40
答案
B
解析
函数fun1(ByVal m As Integer, n As Integer)中m通过ByVal指定为值传递,n为引用传递。传递给该函数的实参会被改变。选B)。
转载请注明原文地址:https://kaotiyun.com/show/RbFp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
设有如下程序:OptionBase0PrivateSubFormClick()DimaDimiAsIntegera=Array(1,2,3,4,5,6,7,8,9)Fori=0To3Printa(5-i);Next
在窗体中添加一个命令按钮、一个标签和一个文本框,并将文本框的Text属性置空,编写命令按钮Command1的Click事件代码:PrivateFunctionfun(xAsI,ong)AsBooleanIfxMod2=0Th
在窗体上有一个名称为Command1的命令按钮,并编写有如下事件过程:PriVateSubCommand1_Click()Move500,500EndSub 程序执行时,单击命令按钮,实现的功能是()。
如果要将一个窗体从内存中清除,应使用的语句是
下面不属于软件测试实施步骤的是
(1)在名称为Form1,标题为“选课”的窗体上添加一个复选框数组,名称为CH1,共有四个复选框,按顺序其标题分别是“数学”、“语文”、“外语”、“计算机”,其中“语文”、“计算机”复选框处在选中状态下,程序运行时的窗体如图所示。请按要求添加控件并设置相应
表达式Sgn(15.6)+Int(-16.8)的值是
下面不属于软件测试实施步骤的是
下列运算符中,优先级最高的是
下列运算符中,优先级别最低的是
随机试题
刀工在烹饪中的作用是_______。
A.皮肤及其网状淋巴管的急性炎症B.一个毛囊及其所属皮脂腺的急性化脓性感染C.皮下、筋膜下蜂窝组织急性炎症D.多个相邻毛囊及其所属皮脂腺的急性化脓陛感染E.皮肤及其网状淋巴管的慢性炎症疖()
复发性阿弗他溃疡的治疗原则是
选择肌内注射部位的原则是()
间接融资的优点在于()。
留置作为一种担保方式,只能通过( )产生留置权。
关于场内证券交易市场,以下描述不正确的是()。
已知流体的流速为ν=(2x+z)i+zk,流体的密度为μ=1.求流体在单位时间内流出曲面∑:z=x2+y2,(0≤z≤1)的流量,其中∑的法向量与z轴正向夹角为锐角.
域名MH.BIT.EDU.CN中主机名是()。
AstudyconductedbyanAustralianscienceagencyhasdiscoveredsignsthatthecountry’sancientAboriginesmayhavebeenthew
最新回复
(
0
)