(31) 不能脫離控件(包括客體) 而獨立存在的過程是
A) 事件過程
B) 通用過程
C) Sub過程
D) 函數過程
(32) Sub過程與Function過程最根本的區(qū)別是
A) Sub過程可以用Call語句直接使用過程名調用,而Function過程不可以
B) Function過程可以有形參,Sub過程不可以
C) Sub過程不能返回值,而Function過程能返回值
D) 兩種過程參數的傳遞方式不同
(33) 單擊命令按鈕時,下列程序的執(zhí)行結果為
Private Sub Command1_Click()
Dim x As Integer, y As Integer
x=12:y=32
Call Proc(x,y)
Print x; y
End Sub
Public Sub Proc(n As Integer, ByVal m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
A) 1232
B) 232
C) 23
D) 123
(34) 單擊命令按鈕時,下列程序的執(zhí)行結果是
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
a=3
b=4
c=5
Print SecProc(c, b, A)
End Sub
Function FirProc(x As Integer, y As Integer, z As Integer)
FirProc=2x+y+3z
End Function
Function SecProc(x As Integer, y As Integer, z As Integer)
SecProc=FirProc(z, x, y) +x
End Function
A) 20
B) 22
C) 28
D) 30
(35) 下列程序的執(zhí)行結果為
Private Sub Command1_Click()
Dim FirStr As String
FirSt="abcdef"
Print Pat(FirStr)
End Sub
Private Function Pat(xStr As String) As String
Dim tempStr As String, strLen As Integer
tempStr=""
strLen=Len(xStr)
i=1
Do While i<=Len(xStr) -3
tempStr=tempStr+Mid(xStr, i, 1) +Mid(xStr, strLen -i+1, 1)
i=i+1
Loop
Pat=tempStr
End Function
A) abcdef
B) afbecd
C) fedcba
D) defabc
希望與更多計算機等級考試的網友交流,請進入計算機等級考試論壇
更多信息請訪問:考試吧計算機等級考試欄目