首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设有如下一段程序: Private Sub Command1_Click() Static a As Variant a=Array("one", "two", "three", "four", "five") Print a(3) End S
设有如下一段程序: Private Sub Command1_Click() Static a As Variant a=Array("one", "two", "three", "four", "five") Print a(3) End S
admin
2015-06-30
21
问题
设有如下一段程序:
Private Sub Command1_Click()
Static a As Variant
a=Array("one", "two", "three", "four", "five")
Print a(3)
End Sub
针对上述事件过程,以下叙述中正确的是( )。
选项
A、变量声明语句有错,应改为Static a(5)As Variant
B、变量声明语句有错,应改为Static a
C、可以正常运行,在窗体上显示three
D、可以正常运行,在窗体上显示four
答案
D
解析
题目中变量a被定义为Variant类型,Variant 是一种特殊的数据类型,除了定长 String 数据及用户定义类型外,可以包含任何种类的数据。变量a被赋值为字符串数组,数组默认下标从0开始,因此元素a(3)的值为"four"。
转载请注明原文地址:https://jikaoti.com/ti/jl60FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下面的程序用“冒泡”法将数组a中的10个整数按升序排列,请在【】、【】、【】处将程序补充完整。OptionBase1PrivateSubCommand1_Click()Dima
把窗体的KeyPreview属性设置为True,并编写如下两个事件过程:PrivateSubForm_KeyDown(KeyCodeAsInteger,ShiftAsInteger)PrintChr(KeyCode)End
下列程序段的执行结果为______。N=0J=1DoUntilN>2N=N+1J=J+N*(N+1)LoopPrintN;J
下面的程序代码实现将一个一维数组中元素向右循环移动,移动次数由文本框Text1输入。例如数组各元素的值依次为0,1,2,3,4,5,6,7,8,9,10;移动三次后,各元素的值依次为8,9,10,0,1,2,3,4,5,6,7。PrivateSu
为了使标签能自动调整大小以显示全部文本内容,应把标签的【】属性设置为True。
冒泡排序在最好情况下时间复杂度为【】。
如果要将窗体中的某个命令按钮设置成无效状态,应该设置命令按钮的那个属性
下列叙述中正确的是
以下说法不正确的是
数据流的类型有【】和事务型。
随机试题
化工生产的操作常用的有连续操作、半连续操作、间歇操作等。()
在Excel工作表中有如题49图所示数据,写出:(1)在E2单元格中用函数求学号为“2015001”学生的平均成绩的公式。(2)在B8单元格中用函数求“数学”科目最高成绩的公式。
下列哪项可加速红细胞沉降率
以下不属于教育计划的主要内容的是
测定胰岛B细胞功能的主要目的是
A.必须按照核准登记的诊疗科目开展诊疗活动B.按照国家有关规定处理C.应当按照国家有关法律、法规的规定办理D.应当立即抢救E.必须遵守有关法律、法规和医疗技术规范医疗机构对传染病、精神病、职业病等患者的特殊诊治和处理
具有燥湿健脾,祛风湿,发汗,明目功效的药物是()
下列属于年老的城市生活垃圾填埋场(填埋时间一般在5年以上)渗滤液的水质特点的是()。
【2015年济南市市中区真题】教师、学生、学校、家庭、社区等都属于课程的有机组成部分。()
Shedoesn’twanttolistentoyounow;shehassomethingurgentto________.
最新回复
(
0
)