首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: 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
18
问题
编写如下程序:
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://jikaoti.com/ti/U1x0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下列程序运行后,单击窗体,在窗体上显示:1,1+2,1+2+3,1+2+3+4,1+2+3+4+5的和。在横线处应填写()。PrivateSubForm_Click()DimiAsInteger,ttAsIntegerFor
在窗体上画一个名为Command1的命令按钮,然后编写以下程序:PrivateSubCommandl_Ctick()DimM(to)AsIntegerFork=1To10M(k)=12一kNe
下列关于栈的叙述中,正确的是
(1)在考生文件夹下有一个工程文件sjt3.vbp,其功能是:1)单击“读数据”按钮,则把考生文件夹下in3.dat文件中的100个按升序排列的整数读入到数组a中,同时显示在Text1文本框中;2)单击“查找”按钮,则提示用户输入查找的数,并利用
有如下数据定义语句:DimX,YAsInteger以上语句表明( )。
下面程序的功能是输出100以内所有素数:PrivateSubCommand1_Click()Forn=2To100isprime=Truek=2DoWhilek
设窗体上有一个名称为Text1的文本框,要求在文本框中输入的字母都变成大写,下面可以实现这一功能的事件过程是()。
若要清除列表框控件中的所有列表项,应该使用的方法是
在软件工程中,白箱测试法可用于测试程序的内部结构。此方法将程序看做是()。
软件工程的理论和技术性研究的内容主要包括软件开发技术和()。
随机试题
正常人血浆的pH为【】
A.胺碘酮B.美西律C.维拉帕米D.硝苯地平E.普萘洛尔为钠通道阻滞剂类抗心律失常药的是()。
被告人江某与被害人郑某是同一家电脑公司的工作人员,二人同住一间集体宿舍。某日,郑某将自己的信用卡交江某保管,3天之后索回。一周后,郑某发现自己的信用卡丢失,到银行挂失时,得知卡上1.5万元已被人取走。郑某报案后,司法机关找到了江某。江承认是其所为,但对作案
仅限于在低速运动的机器上采用的安全防护装置是(),其机制是把暴露在危险中的人体从危险区域中移开。
各级旅游景区质量等级评定机构对所评旅游景区要进行监督检查和复核。全面复核至少每1年进行1次。()
“要教给学生一杯水,教师要有一桶水。”这要求教师应当具备的职业素质是()。
仿照下面画线的句式和修辞方法,另写两个句子,使之构成排比。挣扎使人悲苦,抗争则使人高贵。贝多芬挣扎在孤独的渊谷,但他用音乐作为抗争的云梯,备尝辛酸,终于攀上了永恒的巅峰;_____________,_____________,__________
学校的法人资格,使学校享有民事权利,因而学校和企业一样,可以广泛的参与各种经济活动。()
爸爸、哥哥、妹妹现在的年龄和是64岁。当爸爸的年龄是哥哥的3倍时,妹妹是9岁;当哥哥的年龄是妹妹的2倍时,爸爸34岁。现在爸爸的年龄是多少岁?
Ihavenoidea______youareafamousfootballplayer.
最新回复
(
0
)