首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Command1_Click() Dim x As Integer x=10 Print fun1(x,12)+x End Sub Private Function fun1(m As Integer,n As In
编写如下程序: Private Sub Command1_Click() Dim x As Integer x=10 Print fun1(x,12)+x End Sub Private Function fun1(m As Integer,n As In
admin
2020-04-18
19
问题
编写如下程序:
Private Sub Command1_Click()
Dim x As Integer
x=10
Print fun1(x,12)+x
End Sub
Private Function fun1(m As Integer,n As Integer)As Integer
If n>10Then m=n
fun1=m+n
End Function
程序运行后,单击命令按钮Command1,输出结果为( )。
选项
A、30
B、32
C、34
D、36
答案
D
解析
function fun1函数中的参数都是引用传递,会改变实参的值,执行完后Command1_Click中变量x的值为12。选D)。
转载请注明原文地址:https://kaotiyun.com/show/aMTp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
若已把一个命令按钮的Default属性设置为True,则下面可导致按钮的Click事件过程被调用的操作是( )。
在窗体上画一个命令按钮(其Name属性为Command1),然后编写如下代码:OptionBase1PrivateSubCommand1_Click()Dimaa=Array(1,2,3,4):j=1
在文本框中,要设置显示的文本颜色,应该设置()属性。
现有表示患者和医疗的关系如下:P(P#,Pn,Pg,By),其中P#为患者编号,Pn为患者姓名,Pg为性别,By为出生日期,Tr(P#,D#,Date,Rt),其中D#为医生编号,Date为就诊日期,Rt为诊断结果。检索在1号医生处就诊的病人姓名的表达式是
(1)在考生文件夹下有一个工程文件sjt3.vbp,其功能是:1)单击“读数据”按钮,则把考生文件夹下in3.dat文件中的100个按升序排列的整数读入到数组a中,同时显示在Text1文本框中;2)单击“查找”按钮,则提示用户输入查找的数,并利用
为了使通用对话框弹出的窗口标题显示为“文件操作”,应对通用对话框控件设置的属性是()。
窗体上已有的3个单选按钮组成了1个名为ChkOpt1的控件数组。用于区分控件数组ChkOpt1中每个元素的属性是( )。
下列关于通用对话框CD1的叙述中,错误的是()。
窗体上已有的3个单选按钮组成了1个名为ChkOpt1的控件数组。用于区分控件数组ChkOpt1中每个元素的属性是( )。
下列不属于软件工程三个要素的是()。
随机试题
某患者新诊断为退行性膝关节炎,既往有磺胺过敏史,不宜选用的非甾体抗炎药是
胃阴虚证的临床特征是()
肛裂患者肛门疼痛的特点正确的是
属于癌前病变的外阴白色病变是
可以保持预算的持续性,并能克服传统定期预算法缺点的预算方法是()。
当儿童根据行为的有形后果来判断行为的好坏及严重程度时,说明他处于______。
习近平总书记强调,文学艺术创造、哲学社会科学研究首先要搞清楚()的问题,这是一个根本问题。
设f(x)在(一∞,+∞)上可导,,则a=________.
子过程Plus完成对当前库中“学生表”的年龄字段都加1的操作。SubPlus()DimWSAsDAO.WorkspaceDimdbAsDAO.DatabaseDimrsAsDAO.Recordse
Mr.Dowsonlived36Mr.Carey’s.Mr.Dowsonwasrich,butrude(粗鲁的).Healwaysthought37thebestmanintheworldandcouldne
最新回复
(
0
)