首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: 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 f
编写如下程序: 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 f
admin
2018-06-21
28
问题
编写如下程序:
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 Funetion
程序运行后,单击命令按钮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/DpGp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。在标题为”文本框”、名称为Forml的窗体上画一个名称为Textl的文本框,无初始内容,其高、宽分别为2000、1800,可显示多行,有水平滚动条,并通过属性窗口把文本框的字体
在考生文件夹下有一个工程文件sjt3.vbp,窗体上有两个列表框,名称分别为Listl、List2,在List2中已经预设了内容;还有两个命令按钮,名称分别为C1、C2,标题分别为”添加”、”清除”,如图2-78所示。程序的功能是在运行时,如果选中右边列表
下列选项中属于面向对象设计方法主要特征的是()。
设窗体上有2个直线控件Linel和Line2,若使两条直线相连接,需满足的条件是()。
(1)在考生文件夹下有一个工程文件sjt3.vbp,相应的窗体文件为sjt3.frm。其功能是随机产生20个0~1000的整数,将其放入一个数组中,然后输出这20个整数的平均值。程序运行后,单击命令按钮(名称为Commandl,标题为“输出平均值”),即可
现有语句:Y=IIf(x>0,xMod3,0)设x=10,则Y的值是()。
以下叙述中错误的是()。
以下关于事件、事件驱动的叙述中,错误的是()。
窗体如图1所示。要求程序运行时,在文本框Text1中输入一个姓氏,单击"删除"按钮(名称为Command1),则可删除列表框List1中所有该姓氏的项目。若编写以下程序来实现此功能:PrivateSubCommand1_Click() Dimn%
随机试题
磁石的主治证有
下列各选项中,属于郄穴的是
与大量输血无关的并发症是
嵌顿性疝手法复位后,护士应特别注意观察
患部红肿高大、根盘紧束,焮热疼痛者为患部形小如粟,顶白根硬而深,麻木痒痛者为
粤华酒店系个体户经营,2008年12月取得营业额120000元,购进菜、肉、蛋、面粉、大米等原料费为60000元,缴纳电费、水费、房租、煤气费等15000元,缴纳其他税费合计6600元,当月支付4名雇员工资共2000元(当地税务机关确定雇员月计税工资标准6
发行人推销证券的方法不包括( )。
将函数y=2x+1的图像按向量a平移得到函数y=2x+1的图像,则a等于().
下列关于社会保险法律制度的表述中,正确的是()。
AparentwithachildcarryingamusicalinstrumentoradrawingboardwalkingalongaBeijingsubwayplatformorstreetisafa
最新回复
(
0
)