26、【
单选题
】 下列程序段的执行结果为
a=95
If a>60 Then I=1
If a>70 Then I=2
If a>80 Then I=3
If a>90 Then I=4
Print "I="; I
[2分]
、
I=1
、
I=2
、
I=3
、
I=4
答案:
27、【
单选题
】 下列程序段的执行结果为
a=1
b=0
Select Case a
Case 1
Select Case b
Case 0
Print "* *0* *"
Case 1
Print "* *1* *"
End Select
Case 2
Print "* *2* *"
End Select
[2分]
、
* *0* *
、
* * 1* *
、
* *2* *
、
0
答案:
28、【
单选题
】 下面程序段执行结果为
x=Int(Rnd() + 4)
Select Case x
Case 5
Print "excellent"
Case 4
Print "good"
Case 3
Print "pass"
Case Else
Print "fail"
End Select
[2分]
、
excellent
、
good
、
pass
、
fail
答案:
29、【
单选题
】 下列程序段的执行结果为
a=6
For k=1 To 0
a=a + k
Next k
Print k; a
[2分]
、
-1 6
、
-1 16
、
1 6
、
11 21
答案:
30、【
单选题
】 下列程序段的执行结果为
a=1
b=1
For I=1 To 3
f=a + b
a=b
b=f
Print f;
Next I
[2分]
、
2 3 6
、
2 3 5
、
2 3 4
、
2 2 8
答案:
31、【
单选题
】 下列过程定义语句中,形参个数为不确定数量的过程是
[2分]
、
Private Sub Pro3(x As Double,y As Single)
、
Private Sub Pro3(Arr(3),Option x,Option y)
、
Private Sub Pro3(ByRef x,ByVal y,Arr( ))
、
Private Sub Pro3(ParamArray Arr( ))
答案:
32、【
单选题
】 单击命令按钮时,下列程序的执行结果为
Private Sub Command1_Click()
Dim x As Integer, y As Integer
x=12: y=32
Call PCS(x, y)
Print x; y
End Sub
Public Sub PCS(ByVal n As Integer, ByVal m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
[2分]
、
12 32
、
2 32
、
2 3
、
12 3
答案:
33、【
单选题
】 单击一次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click()
s=P(1) + P(2) + P(3) + P(4)
Print s
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum + i
Next i
P=Sum
End Function
[2分]
、
15
、
25
、
35
、
45
答案:
34、【
单选题
】 下列程序的执行结果为
Private Sub Command1_Click()
Dim s1 As String, s2 As String
s1="abcdef"
Call Invert(s1, s2)
Print s2
End Sub
Private Sub Invert(ByVal xstr As String, ystr As String)
Dim tempstr As String
i=Len(xstr)
Do While i >=1
tempstr=tempstr + Mid(xstr, i, 1)
i=i - 1
Loop
ystr=tempstr
End Sub
[2分]
、
fedcba
、
abcdef
、
afbecd
、
defabc
答案:
35、【
单选题
】 阅读下列程序:
Private Sub Command1_Click()
Dim i As Integer, k As Integer
k=2
For i=1 To 3
Print H(k) ;
Next i
End Sub
Function H(j As Integer)
a=0
Static b
a=a + 1
b=b + 1
H=a*b + j
End Function
程序运行后,单击命令按钮输出结果是
[2分]