(21) 用什么语句可以选择指定的表项或取消已选择的表项?
a) 列表框.selected(索引值)
b) 列表框名.selected(索引值) =true|false
c) 列表框.selected
d) 列表框名.selected=true|false
正确答案: b
(22) 用于将屏幕上的对象分组的控件是
a) 列表框
b) 组合框
c) 标签
d) 框架
正确答案: d
(23) 以下说法不正确的是
a) 使用redim语句可以改变数组的维数
b) 使用redim语句可以改变数组的类型
c) 使用redim语句可以改变数组的每一维的大小
d) 使用redim语句可以改变对数组中的所有元素进行初始化
正确答案: b
(24) 有如下事件过程:
private sub form_keydown(keycode as integer, shift as integer)
if (button and 3) =3 then
print "ok"
end if
end sub
程序运行后,为了在窗体上输出"ok",应当按下的鼠标键是
a) 左键
b) 右键
c) 同时按下左键和右键
d) 按什么都不显示
正确答案: d
(25) 在窗体上画一个名称为commondialog1的通用对话框,一个名称为command1的命令按钮,要求单击命令按钮时,打开一个保存文件的对话框,该窗口的标题为"save",缺省文件名称为"savefile",在"文件类型"栏中显示*txt,则能够满足上述要求的程序是
a) private sub command1_click()
commondialog1.filename="savefile"
commondialog1.filter="allfiles|*.*|(*.txt) |*.txt|(*.doc) |*.doc"
commondialog1.filterindex=2
commondialog1.dialogtitle="save"
commondialog1.action=2
end sub
b) private sub command1_click()
commondialog1.filename="savefile"
commondialog1.filter="allfiles|*.*|(*.txt) |*.txt|(*.doc) |*.doc"
commondialog1.filterindex=1
commondialog1.dialogtitle="save"
commondialog1.action=2
end sub
c) private sub command1_click()
commondialog1.filename="save"
commondialog1.filter="allfiles|*.*|(*.txt) |*.txt|(*.doc) |*.doc"
commondialog1.filterindex=2
commondialog1.dialogtitle="savefile"
commondialog1.action=2
end sub
d) private sub command1_click()
commondialog1.filename="savefile"
commondialog1.filter="allfiles|*.*|(*.txt) |*.txt|(*.doc) |*.doc"
commondialog1.filterindex=1
commondialog1.dialogtitle="save"
commondialog1.action=1
end sub
正确答案: a
(26) 阅读下面的程序段:
for a=1 to 2
for b=1 to a
for c=b to 2
i=i + 1
next
next
next
print i
执行上面的三重循环后,i的值为
a) 4
b) 5
c) 6
d) 9
正确答案: b
(27) 设有下面的循环:
i=0
while i <=1
i=i + 3
print i
wend
则运行后的输出结果是
a) 1
b) 2
c) 3
d) 4
正确答案: c
(28) 设有下面的循环:
i=1
do
i=i + 3
print i
loop until i>
程序运行后要执行3次循环体,则条件中i的最小值为
a) 6
b) 7
c) 8
d) 9
正确答案: b
(29) 执行以下语句过程,在窗体上显示的内容是
option base 0
private sub command3_click()
dim d
d=array("a", "b", "c", "d")
print d(1) ; d(3)
end sub
a) ab
b) bd
c) ac
d) 出错
正确答案: b
(30) 下列程序段,在运行时最早输出的内容是
a=2
c=1
aaa:
c=c + a
if c < 10 then
print c
goto aaa
else
print "10以内的奇数显示完毕。"
end if
a) 3
b) 7
c) 9
d) 6
正确答案: a
本文共4页:第
[1] [2] [3] [4] 页
