首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Command1_Click() Dim x As Integer x = 10 Print fun1(x, 12) + x End Sub Private Function fun1(m As I
编写如下程序: Private Sub Command1_Click() Dim x As Integer x = 10 Print fun1(x, 12) + x End Sub Private Function fun1(m As I
admin
2018-05-08
12
问题
编写如下程序:
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 > 10 Then 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://jikaoti.com/ti/d9y0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
有三个关系R、S和T如下:则由关系R和S得到关系T的操作是
在E盘当前目录文件夹下建立一个名为”Student.txt”的随机文件,要求用InputBox函数输入5个学生的姓名(SmName)、年级(StuGrade)和年龄(StuAge)。在程序中有以下记录类型和窗体的事件过程,请选择正确的语句完成程序(
(1)在考生目录下有一个工程文件sjt3.vbp。窗体上有个钟表图案,其中代表指针的直线的名称是Linel,还有一个名称为Labell的标签,和其他一些控件,如图2-28(a)所示。在运行时,若用鼠标左键单击圆的边线,则指针指向鼠标单击的位置,如图2.28
下面程序执行时,输出的结果是()。PrivateSubForm_Click()DimiAsIntege,jAsIntegeri=10Doi=i+jForj=10ToiStep-3i=i+jNextj
窗体上命令按钮的事件过程如下:PrivateSubCommandl_Click()A=“34”:B=“26”:C=“98”PrintB+C+AEndSub运行程序后,单击命令按钮,输出结果是()。
数据库系统在其内部具有3级模式,用来描述数据库中全体数据的全局逻辑结构和特性的是()。
在窗体上画一个命令按钮(其Name属性为Commandl),然后编写如下代码:OptionBaselPrivateSubCommandl_Click()Dimaa=Array(1,2,3,4)j=lFori=4To1
用LineInput语句从顺序文件读出数据时,每次读出一行数据。所谓一行是指遇到()分隔符,即认为一行的结束。
在考生目录下有一个工程文件sjt5.vbp,其窗体上有两个标签L1和L2,标题分别为”口令”和”允许次数”;一个命令按钮Cl,标题为”确定”;两个文本框名称分别为Textl和Text2。其中Textl用来输入口令(输入时,显示”*”),无初始内容;Text
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。在名称为Forml的窗体上画两个文本框,名称分别为Tl、T2,初始情况下都没有内容。请编写适当的事件过程,使得在运行时,在T1中输入的任何字符,立即显示在T2中(如图2-176
随机试题
距骨下关节面呈切线位显示的摄影体位是
母犬,脐部出现局限性肿胀近6个月,触诊该肿胀柔软,饱食和挣扎时肿胀增大,压迫肿胀可缩小,皮肤无红、热、痛等炎性反应。该病最可能的诊断是()。
上颌第一磨牙较长的髓角是
用加总的方法进行扩大时距的数据合并,适用于时点性总量指标。( )
以下关于封闭式基金的说法,不正确的是()。
银行集中监管体制是指政府通过()银行监管当局来行使监管职能的方式。
“人而无信,不知其可也。”诚实守信是公民道德的基石,是对每个人最起码的道德要求,同时也是一种经济道德、社会公德。“诚招天下客,誉从信中来”,诚信是市场经济的本质属性.是企业宝贵的无形资产。诚信也是社会和谐的纽带,如果不能在公民中普遍地培育起诚信意识,人与人
Therigidhigher-educationbusinessisabouttoexperienceawelcomeearthquake.Traditionaluniversitiesnowfaceanew【C1】____
______resultsin"Acidrain"?______couldcontributetoglobalwarming?
Manypeoplecatchacoldinthespringtimeorfall.Itmakesus【T1】______:ifscientistscansendamantothemoon,whycan’tt
最新回复
(
0
)