(21) 使用语句dim a(2) as integer 声明数组a之后,以下说法正确的是
a) a数组中的所有元素都为0
b) a数组中的所有元素值不确定
c) a数组中所有元素值都为empty
d) 执行erase a后,a数组中所有元素值都不为0
正确答案: a
(22) 有如下事件过程,当同时按下转换键shift和功能键f5时其最后输出的信息是
const shiftkey=1
const ctrlkey=2
const key_f5=&h74
const key_f6=&h75
private sub text1_keydown(keycode as integer, shift as integer)
if keycode=key_f5 and shift=shiftkey then
print "press shift+f5"
elseif keycode=key_f6 and shift=ctrlkey then
print "press ctrl+f6"
end if
end sub
a) 无任何信息
b) press shift+f5
c) press ctrl+f6
d) 程序出错
正确答案: b
(23) 执行下列程序后,鼠标单击窗体,输出结果为 。
private sub form_click()
print "click";
end sub
private sub form_mousedown(button as integer, shift _
as integer, x as single, y as single)
print "donw"
end sub
private sub form_mouseup(button as integer, shift _
as integer, x as single, y as single)
print " up"
end sub
a) downupclick
b) clickdownup
c) downclickup
d) updownclick
正确答案: a
(24) 以下事件过程可以将打开的对话框的标题改为"新时代"的是
a) private sub command2_click()
commondialog1.dialogtitle="新时代"
commondialog1.showopen
end sub
b) private sub command2_click()
commondialog1.dialogtitle="新时代"
commondialog1.showfont
end sub
c) private sub command2_click()
commondialog1.dialogtitle="新时代"
commondialog1.show
end sub
d) private sub command2_click()
commondialog1.dialogtitle="新时代"
commondialog1.showcolor
end sub
正确答案: a
(25) 如果要设计一个多窗体程序时,要设计一个封面窗体(名称(name) 为formcover,标题(caption 为"多媒体演示") ,其内部的各控件及其属性见下表。
控件 名称(name) 标题(caption)
图片框 pic1
命令按钮1 command1 "演示"
命令按钮2 command2 "结束"
则设计出的窗体可能是
a) b)
c) d)
正确答案: a
(26) 下列语句中,不能实现循环100次的是
a) n=0
do
n=n+1
loop until n>=100
b) n=0
do
n=n+1
loop while n<100
c) n=0
n=n+1
do
loop until n<100
d) n=0
do while n<100
n=n+1
loop
正确答案: c
(27) 单击一次命令按钮后,下列程序的执行结果为
private sub command1_click()
dim m as integer, i as integer, x(10) as integer
for i=0 to 4: x(i) =i + 1: next i
for i=1 to 2: call prioc(x) : next i
for i=0 to 3: print x(i) ;: next i
end sub
private sub prioc(a() as integer)
static i as integer
do
a(i) =a(i) + a(i + 1)
i=i + 1
loop while i < 2
end sub
a) 3 4 7 5
b) 3 5 7 4
c) 1 2 3 4
d) 1 2 3 5
正确答案: b
(28) 下面程序段的运行结果是
a=1
b=1
do
a=a + 1
b=b + 1
loop until b > 5
print "k="; a; spc(4) ; "b="; b + a
a) k=7 b=14
b) k=6 b=6
c) k=4 b=8
d) k=6 b=12
正确答案: d
本文共4页:第
[1] [2] [3] [4] 页
