首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如
admin
2013-01-23
18
问题
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如下事件过程,执行该事件过程调用Sun过程,结果为( )。 Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a, b Print a; b End Sub
选项
A、1.25 1
B、5 4
C、4 5
D、1 1.25
答案
A
解析
本题考查过程的调用,如果用Call 句调用子过程时,实际参数要放在括号中,如果不使用Call子句,则不必使用括号。本题参数调用时是按地址传递,因此Sun过程中变量的值改变也即改变了单击事件中的a、b变量值。Sun a,b的执行过程是:t=x=5,x=t/y=1.25,y=t Mod y=1。
转载请注明原文地址:https://kaotiyun.com/show/MShp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程:PrivateSubCommand1_Click()Forn=1To20IfnMod3<>0Thenm=m+n\3Ne
在窗体上画一个命令按钮(其Nmne属性为Command1),然后编写如下代码:OptionBaselPrivateSubCommand1_Click()Dima
软件需求分析阶段的工作可以分为4个方面:需求获取、需求分析、编写需求分析说明书和
以下程序的功能是每隔一定的时间在窗体的文本框中显示当前时间,刷新的时间间隔由滚动条来设定。窗体中有三个控件:文本框控件Text1用来显示当前时间,水平滚动条控件Hscroll1用来设置Timer1控件发生Timer事件的时间间隔,计时器控件Timer1用来
软件动态测试大致可以分为【】测试法和黑盒测试法
注意:下面出现的“考生文件夹”均为C:\wexam\25160002。(1)在考生文件夹下有一个工程文件sjt3.vbp,相应的窗体文件为sjt3.frm。其功能是产生20个0~1000的随机整数,放入一个数组中,然后输出这20个整数中大于50
数据字典是各类数据描述的集合,它通常包括5个部分,即数据项、数据结构、数据流、______和处理过程。
数据的______包括集合、线性结构、树型结构和图状结构四种基本类型。
随机试题
有下列()情形之一,以非法占有为目的,在签订、履行合同过程中,骗取对方当事人财物,数额较大的,构成合同诈骗罪。
男性,25岁。踢足球后淋雨,晚上突然寒战,高热,伴全身肌肉酸痛,右胸痛,深呼吸时加重,咳嗽,咳少量铁锈色痰。查体:急性病容,口角有疱疹,体温39.5℃,脉搏100次/分,右肺触觉语颤增强,叩诊呈浊音,可闻及支气管呼吸音。实验室检查:WBC21×109/L
易与FeCl3反应的是
患儿,10岁。两天前臀部及双下肢皮肤出现紫癜,伴腹痛阵作,口臭纳呆,腹胀便秘,今日出现便血,舌红,苔黄,脉滑数。其证型是()
人体内最重要的调节机制是
亲权[武大2014年研]
以下有关模板安装工程安全技术措施正确的是()。
下列不属于主动管理方法内容的有( )。
根据联合国《儿童权利公约》,政府各部门和机构在制定相关政策和落实措施时应首先考虑()。
Today,mostcountriesintheworldhavecanals.Somecanals,suchastheSuezorthePanama,【C1】______shipsweeksoftimebymak
最新回复
(
0
)