首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
编写如下程序: Private Sub Commandl-Click() Dim x As Integer x=10 Print funl(x,12)+x End Sub Private Function funl(
编写如下程序: Private Sub Commandl-Click() Dim x As Integer x=10 Print funl(x,12)+x End Sub Private Function funl(
admin
2020-01-02
28
问题
编写如下程序:
Private Sub Commandl-Click()
Dim x As Integer
x=10
Print funl(x,12)+x
End Sub
Private Function funl(m As Integer,11 As Integer)As Integer
If n>10 Then m=n
funl=m+n
End Function
程序运行后,单击命令按钮Commarid1,输出结果为( )。
选项
A、30
B、32
C、34
D、36
答案
D
解析
Function funl函数中的参数都是引用传递,会改变实参的值,执行完后Commandl-Click中变量x的值为12。选D)。
转载请注明原文地址:https://kaotiyun.com/show/PETp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画一个命令按钮,然后编写如下事件过程:PrivateSubCommand1_Click()DimI,NumRandomizeDoForI=1To1000Num=Int(Rnd
在考生文件夹下有一个工程文件sjt5.vbp,窗体上有两个命令按钮,标题分别是“读数据”和“统计”,请添加一个名称为Label1、标题为“回文个数为”的标签和一个名称为Text1,初始内容为空的文本框,如图所示。程序功能如下:①单击“读数据”按
(1)在考生文件夹下有一个工程文件sjt3.vbp,其功能是:①单击“读数据”按钮,则将考生文件夹下in3.dat文件中的100个正整数读入数组a中。②单击“计算”按钮,则找出这100个正整数中的所有完全平方数(一个整数若是另一个整数的平方
(1)在名称为Form1的窗体上添加一个名称为C1、标题为“改变颜色”的命令按钮,窗体标题为“改变窗体背景色”。编写程序,使得单击命令按钮时,将窗体的背景颜色改为红色(&HFF&)。运行程序后的窗体如图所示。要求:程序中不得使用变量,每个事件过程
在考生文件夹下有一个工程文件sjt5.vbp,包含了所有控件和部分程序。当程序运行时,单击“打开文件”按钮,则弹出“打开”对话框,默认目录为考生目录,默认文件类型为“文本文件”。选中in5.眦文件(如图1所示),单击“打开”按钮,则把文件中的内容读入并显示
在考生文件夹下有一个工程文件sjt5.vbp,在其窗体中有一个实心圆。程序运行时,当用鼠标左键单击窗体任何空白位置时,实心圆则向单击位置直线移动;若用鼠标右键单击窗体,则实心圆停止移动。窗体文件中已经给出了全部控件,但程序不完整。要求:请去掉程序
在考生文件夹下有一个工程文件sjt5.vbp,已给出了所有控件(如图3.141所示)和部分程序。程序运行时,请按以下顺序操作:1)单击“读入文件”按钮,把考生目录下的文件in5.dat中的内容读入内存并显示在上面的文本框(Text1)中;
下列关于函数过程的叙述中,正确的是()。
(1)在名称为Form1,标题为“选课”的窗体上添加一个复选框数组,名称为CH1,共有四个复选框,按顺序其标题分别是“数学”、“语文”、“外语”、“计算机”,其中“语文”、“计算机”复选框处在选中状态下,程序运行时的窗体如图所示。请按要求添加控件并设置相应
在E—R图中,用来表示实体联系的图形是()。
随机试题
患者男,63岁。因“前臂近端掌侧疼痛1个月”来诊。查体:屈拇指末节功能障碍,示指、中指末节屈曲运动乏力,不能做拇指与示指的指甲对指甲的持物动作,捻指征(+),做患侧前臂旋前对抗试验或拇指、示指、中指末节屈曲对抗试验可诱发疼痛。X线片未见异常。最可能的诊
少尿的概念是指每天的尿量是
马斯洛将人的基本需要分为五个层次,由低到高依次为
某国际工程合同额为5000万元人民币,合同实施天数为300天;由国内某承包商总承包施工,该承包商同期总合同额为5亿人民币,同期内公司的总管理费为1500万元;因为业主修改设计,承包商要求工期延期30天。该工程项目部在施工索赔中总部管理费的索赔额是(
美国东北部大城市带(亦称波士华城市带)是世界上形成最早、发育最为成熟的大城市带。下图为“1970--2008年波士华城市带五个大城市中心城区人口增长率变化和城市带人口增长率曲线示意图”。完成下列问题。影响Ⅳ一V阶段波士华城市带各大城市中心城区人口变化
我国外贸体制的主体是()。
在宋代,不仅是民间艺人使用的白话话本小说的写作发展到了新的高峰,并且出现了专门叙说历史故事的书场“瓦舍”,与专事歌舞表演的场所“勾栏”__________,被时人合称为“瓦舍勾栏”。填入画横线部分最恰当的一项是:
下列有关E-R模型向关系模型转换的叙述中,不正确的是()。
树L中度为1、2、3、4、5和6的结点个数为6、4、3、3、5、1,则L中叶子的个数是【】。
Ireceivedane-cardforChristmasfrommybrothertowhomIhavejustfinishedmailingacard.Iunderstandthatsometimesiti
最新回复
(
0
)