首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设有如下一段程序: 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
2020-02-27
28
问题
设有如下一段程序:
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/1yx0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
设有栈S和队列Q,初始状态均为空。首先依次将A,B,C,D,E,F入栈,然后从栈中退出三个元素依次入队,再将X,Y,Z入栈后,将栈中所有元素退出并依次入队,最后将队列中所有元素退出,则退队元素的顺序为()。
下列叙述中正确的是()。
下面对软件测试描述错误的是()。
有下面的程序段:x=InputBox(“字符串”,“输入”,“请输入”)Printx如果执行上面程序段时没有从键盘输入任何内容就直接按了回车键,则输出内容是()。
如果将命令按钮的访问键设置为“D”,以下不会触发命令按钮Click事件的操作是()。
命令按钮、单选按钮、复选框都可以通过Picture属性在控件上显示图片,但需事先设置某一属性,该属性为()。
数据流图中带有箭头的线段表示的是()。
表示“x+y小于10且x—y大于或等于6”的VisualBasic表达式是()。
在窗体Form1上放一个名为Text1的文本框和一个名为Command1的命令按钮,然后编写一个事件过程。要求程序运行后,如果在文本框中输入一个字符,则把命令按钮的标题设置为“VB等级考试二级”。以下能正确实现上述操作的事件过程是()。
建立表示学生选修课程活动的实体联系模型,其中的两个实体分别是()。
随机试题
Themainpurposeofaresumeistoconvinceanemployertograntyouaninterview.Therearetwokinds.Oneinthefamiliar"tom
在计算应纳税所得额时以折旧、摊销形式在税前扣除的项目是()。
下列情形中,不能作为坏账损失在计算应纳税所得额时扣除的是()。(2015年)
对于营改增试点企业,下列选项中不得抵扣进项税额的包括()。
旅行社业务经营许可证()。
()主要体现智能电网的先进性。
甲、乙两个仓库存放一批化肥,甲仓库比乙仓库多120袋,如果从乙仓库搬出25袋放进甲仓库,乙仓库的化肥的袋数就是甲仓库的3/5,乙仓库原有化肥多少袋?()
下列程序段的输出结果是CLEARSTORE10TOASTORE20TOBSETUDFPARMSTOREFERENCGD0SWAPWITHA,(B)?A
ProsandConsoftheNuclearFamilyVocabularyandExpressionsspouseconsistencyclose-knitlike-mindeddeleg
Morethanfiftyyearsago,theUnitedNationsdeclaredthatliteracyisabasichumanright.It’sveryimportantfor【B1】______th
最新回复
(
0
)