计算机二级

3773考试网计算机等级考试计算机二级正文

2014计算机二级VB考试试题及答案14

来源:2exam.com 2014-8-4 10:30:08

 

11.instr函数返回值的类型为(A)(单)
A.数值
B.字符串
C.变体
D.货币
12.在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub command1_click( )
Dim a As String, b As String
a = InputBox("Enter the First integer")
b = InputBox("Enter the Second integer")
Print b + a
End Sub程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和111,则输出结果是(D)(单)
A.456
B.111
C.567
D.111456
13.在窗体上画一个命令按钮,然后编写如下事件过程:
private sub command1_click( )
dim a,b as integer
a=Val(inputbox("Enter the First integer"))
b=Val(inputbox("Enter the Second integer"))
Print b+a
end sub
程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和111,则输出结果是(C)(单)
A.456
B.111
C.567
D.111456
14.执行下面的语句后,所产生的信息框的标题是(B)(单)
a = MsgBox("你好", 5, "中国")
A.你好
B.中国
C.5
D.出错,不能产生信息框
15.语句Print "25+32=" & (25+32)的输出结果是【25+32=57】。
16.以下的输出结果是【beijing】。
S$="china"
s$="beijing"
Print s$
17.以下语句的输出结果是【3】。
A%=3.14156
Print A%
18.设a=sqr(2),则语句Print format$(a,"000.0")的输出结果是【001.4】。
19.设a=sqr(3),则语句Print format$(a,"###.0")的输出结果是【1.7】。
20.设a = Sqr(3) * 2,则
Print Format$(a, "00.000")的输出结果是【03.464】。

上一页  [1] [2] 

触屏版 电脑版
3773考试网 琼ICP备12003406号-1