首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的输出结果是 Dim x As Integer Private Sub Command4_Click() Dim y As Integer x=3 y=10 Call fun(y,x) Msg
下列程序的输出结果是 Dim x As Integer Private Sub Command4_Click() Dim y As Integer x=3 y=10 Call fun(y,x) Msg
admin
2020-07-25
10
问题
下列程序的输出结果是
Dim x As Integer
Private Sub Command4_Click()
Dim y As Integer
x=3
y=10
Call fun(y,x)
MsgBox"y="&y
End Sub
Sub fun(ByRef y As Integer,ByVal z As Integer)
y=y+z
z=y-z
End Sub
选项
A、y=3
B、y=10
C、y=13
D、y=7
答案
C
解析
在函数参数传递中,包括按地址传递ByRef和按值传递ByVal两种方法。其中前者在函数体内改变变量值会影响参数外的变量,后者不会。本题y是按地址传递,调用fun()函数后,会将Y的值改为fun()函数中V的值,所以应选择选项C。
转载请注明原文地址:https://jikaoti.com/ti/PPQ0FFFM
本试题收录于:
二级Access题库NCRE全国计算机二级分类
0
二级Access
NCRE全国计算机二级
相关试题推荐
在考生文件夹下已有“samp0.accdb”和“samp1.accdb”数据库文件。“samp0.accdb"中已建立表对象“tTest”,“samp1.accdb”中已建立表对象“tEmp”和“tSalary”。试按以下要求,完成表的各种操作:将“t
考生文件夹下存在一个数据库文件“samp3.accdb”,里面已经设计好表对象“tNorm”和“tStock”、查询对象“qStock”和宏对象“m1”,同时还设计出以“tNorm”和“tStock”为数据源的窗体对象“fStock”和“fNorm”。试在
考生文件夹下存在一个数据库文件“samp2.accdb”,里面已经设计好表对象“tOrder”“tDetail”“tEmployee”和“tBook”,试按以下要求完成设计:创建一个查询,查找某月出生雇员的售书信息,并显示“姓名”“书籍名称”“订购日期
考生文件夹下存在一个数据库文件“samp2.accdb”,里面已经设计好三个关联表对象(名为“tSmd”“tCourse”“tScore”)一个空表(名为“tTemp”)和一个窗体对象(名为“fTemp”)。试按以下要求完成设计:创建追加查询,将表对象
考生文件夹下存在一个数据库文件“samp3.accdb”,里面已经设计了表对象“tEmp”、窗体对象“fEmp”、报表对象“rEmp”和宏对象“mEmp”。同时,给出窗体对象“fEmp”上一个按钮的单击事件代码,试按以下功能要求补充设计:单击窗体“报表
考生文件夹下存在一个数据库文件“samp3.accdb”,里面已经设计好表对象“tUser”,同时还设计出窗体对象“fEdit”和“fUser”。请在此基础上按照以下要求补充“fEdit”窗体的设计:将窗体中名称为“tPass”和“tEnter”文本框
在考生文件夹下有一个数据库文件“sampl.accdb”和一个图像文件“photo.bmp”。在数据库文件中已经建立了一个表对象“tStud”。请按以下操作要求,完成各种操作。(1)设置“ID”字段为主键;并设置“ID”字段的相应属性,使该字段在数据表视
在考生文件夹下,存在一个数据库文件“sampl.accdb”。在数据库文件中已经建立了“tStock”和“tQuota”两个表对象。试按以下操作要求,完成各种操作:(1)分析“tStock”和“tQuota”两个表对象的字段构成,判断并设置两个表的主键。
—棵二叉树共有31个节点,其中8个是叶子节点,则度为1的节点数为()。.
如果变量X是一个正的实数,保留两位小数、将千分位四舍五人的表达式是()。
随机试题
A.心肌炎B.心内膜炎C.心外膜炎D.心包炎类风湿关节炎患者心脏受累最常表现为
A.小儿急性阑尾炎B.妊娠早期急性阑尾炎C.老年人急性阑尾炎D.慢性阑尾炎钡灌肠检查对诊断有帮助的是
组成药物中含有连翘的方剂是
下列属于合同终止的原因的是()。
关于股票和股票基金的说法不正确的是()。
中国证监会在审核期间提出反馈意见要求上市公司作出书面解释、说明的,上市公司应当自收到反馈意见之日起( )日内提供书面回复意见,独立财务顾问应当配合上市公司提供书面回复意见。
常用的局部总线是()。
Sincethedawnofhumaningenuity,peoplehavedevisedevermorecunningtoolstocopewithworkthatisdangerous,boring,burd
【B1】【B15】
【B1】【B20】
最新回复
(
0
)