2007年9月全国计算机等级考试二级VB模拟试题(5)及答案

出处:Examlink 作者:刀断水 日期:2007年09月13日 10时11分

(31) 不能脱离控件(包括客体) 而独立存在的过程是
A) 事件过程      
B) 通用过程
C) Sub过程      
D) 函数过程
正确答案:  A

(32) Sub过程与Function过程最根本的区别是
A) Sub过程可以用Call语句直接使用过程名调用,而Function过程不可以
B) Function过程可以有形参,Sub过程不可以
C) Sub过程不能返回值,而Function过程能返回值
D) 两种过程参数的传递方式不同
正确答案:  C

(33) 单击命令按钮时,下列程序的执行结果为
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
正确答案:  B

(34) 单击命令按钮时,下列程序的执行结果是
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=2x+y+3z
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
正确答案:  C

(35) 下列程序的执行结果为
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
 正确答案:  B

最后更新时间:2008-05-28 12:15:56
文章评论
共有 0 位网友发表了评论
用户名: 新注册) 密码: 匿名评论 [查看所有评论]

评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
您可以用以下几种方式找到此文章

考试全流程