7
6
5
4
3
第1题:
单击命令按钮时,下列程序代码的执行结果为( )。 Private Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Funcfion Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Funcfion Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2 b=3 c=4 Printf SecProc(c,b,a) End Sub
A.21
B.19
C.17
D.34
第2题:
有以下函数过程: Function Gys (ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 Reminder = x Mod y x = y y= Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a = 50 b = 10 x=Gys (a,B)Print x End Sub
A.0
B.10
C.50
D.100
第3题:
A567 563
B567 567
C567 167
D567 163
第4题:
有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Print x End Sub
A.0
B.25
C.50
D.100
第5题:
单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End Function
A.21
B.23
C.19
D.35
第6题:
要想在过程Proc调用后返回形参x和y的变化结果,下列定义语句中正确的是______。
A.Sub Proc(x as Integer, y as Integer)
B.Sub Proc(By Val x as Integer, y as Integer)
C.Sub Proc(x as Integer, By Val y as Integer)
D.Sub Proc(By Val x as Integer, By Val y as Integer)
第7题:
单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, z As Integer x = 1: y = 2: z = 3 Call fun1 (x, y, z) Print x; y; z Call fun2(x, y, z) Print x; y; z End Sub Private Sub fun1(x As Integer, y As Integer, z As Integer) x = 10 * z y=z*z+ x z=x+ y+ z End Sub Private Sub fun2 (ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) x=10*z y=z*z+ x z=x+ y +z End Sub
A.1 2 3 30 39 72
B.1 2 3 1 2 3
C.30 39 72 1 2 3
D.30 39 72 30 39 72
第8题:
( 27 )要想在过程 Proc 调用后返回形参 x 和 Y 的变化结果,下列定义语句中正确的是
A ) Sub Proc ( x as Integer,y as Integer )
B ) Sub Proc ( ByVal x as Integer, y as Integer )
C ) Sub Proc ( x as Integer,Byval y as Integer )
D ) Sub Proc ( Byval x as Integer, Byval y as Integer )
第9题:
单击命令按钮时,下列程序的执行结果是
Private Sub Commandl_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
第10题:
单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim x As Integer,y As Integer x=50:y=78 Call PPP(x,y) Print x;y End Sub Public Sub PPP(ByVal n As Integer,ByValm As Integer) n=n\10 m=m\10 End Sub
A.08
B.50 78
C.450
D.78 50