首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:Function Func(ByVal x As Integer, y As Integer) y=x*y If y >0 Then Func = x El
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:Function Func(ByVal x As Integer, y As Integer) y=x*y If y >0 Then Func = x El
admin
2013-04-11
15
问题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:Function Func(ByVal x As Integer, y As Integer) y=x*y If y >0 Then Func = x Else Func = y End IfEnd FunctionPrivate Sub Command1_ Click( ) Dim a As Integer, b As Integer a=3 b=4 c = Func(a, B ) Print "a="; a Print "b="; b Print "c="; cEnd Sub程序运行后,单击命令按钮,其输出结果为______。
选项
A、a=3 b=12 c=3
B、a=3 b=4 c=3
C、a=3 b=4 c=12
D、a=13 b=12 c=12
答案
A
解析
函数Func(3,4)的返回值为3,故c的值为3。由于参数x是按值传递的,a的值仍为3;而参数y是按地址传递的,b的值变为3*4。
转载请注明原文地址:https://kaotiyun.com/show/WBQp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画一个通用对话框,其名称为CommonDialog1,然后画一个命令按钮,并编写如下事件过程:PrivateSubCommand1_Click()CommonDialog1.Filter="AllFiles(*.*)|*
1.在窗体上画两个文本框,名称分别为T1、T2,初始情况下均为空白,编写适当的事件过程。程序运行后,如果在T1中输入字符,则所输入的字符立即在T2中显示出来,并把小写字母转换为相应的大写字母,如图1—1所示。要求:程序中不得使用任何变量。注意:存盘时
注意:下面出现的“考生文件夹”均为C:\wexam\25160002。请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在名称为Form1的窗体上画一个文本框,名称为Text1,字体为“黑体”,文本框中的
有一个工程文件ylc5.vbp,窗体上有一个单选按钮数组,含3个没有标题的单选按钮。为单选按钮添加标题“语文”、“数学”、“英语”;再添加一个标题为“显示”的命令按钮,运行后将根据单选按钮的选中情况,在窗体上显示“我喜欢语文”、“我喜欢数学”、“我喜欢英语
在窗体上先画一个名为Text1的文本框和—个名为Label1的标签,再画—个名为Op1的有4个单选按钮的单选按钮选项组,其Index属性按季度顺序为0~3(见图1)。在文件sales.txt中按月份顺序存有某企业某年12个月的销售额。要求在程序执行时,鼠标
下面选项中不属于面向对象程序设计特征的是______。
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在名称为Forml的窗体上建立一个名称为Commandl、宽度为1600、高度为600、标题为“输出”的命令按钮,编写适当的事件过程,要求程序运行后,如果单击“输出
(1)在考生文件夹下有一个工程文件sj3.vbp,两个窗体文件,文件名分别为sj31.frm和sj32.frm。此工程实现的功能是,在运行时只显示名为Form2的窗体,单击Form2上的Commandl按钮,则弹出名为Forml的窗体;单击Forml上的C
结构化程序设计原则和方法中要求对语言中所没有的控制结构,应该采用【】的方法来模拟。
n个顶点的强连通图的边数至少有______。
随机试题
大定风珠组成中“三甲”是指
建设项目文档资料的特征包括( )。
设备监理目标的( )首先表明按照承包合同、国家的技术规范和质量标准、劳动生产定额及经济参数制定的目标值是可行的、合理的;其次,给定的目标值在现有的生产条件和市场条件下,承包商运用现代生产技术、科学管理方法和严格的检验手段是可以完成的;最后,给定的目标值在
下列工程项目策划内容中,属于工程项目实施策划的有()。
以下民用建筑中无需设置排烟设施的是()。
自然人甲拟设立个人独资企业。下列表述中,符合个人独资企业法律制度规定的有()。
以下关于以任务或过程为取向的研讨的说法,错误的是()。
人生不可能是尽善尽美的,我们也很难找到一朵花是完美无缺的。虽然人体总的来说是左右对称的,可是这种对称远远不是完全的。每个人左右手的粗细不一样,一只眼睛比另一只眼睛更大或更圆。两个耳垂的形状也不同。最明显的,就是每个人只有一个心脏,通常都在靠左的位置。
WhenPaulGorski,thefounderofanorganizationcalledEdChange,visitscollegesanduniversitiestoadvisethemoncampusdive
Inacountrythatdefinesitselfbyideals,notbysharedblood,whoshouldbeallowedtocome,workandlivehere?Inthewake
最新回复
(
0
)