单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=2:b=3:C=4 Print P2(c,b,A)End Sub Private Function P1(x As Integer,y As Integer,z As Integer) P1=2 * X + y + 3 * z End Function Private Function P2(x As Integer,y As Integer,z As Integer) P2=P1(z,x,y) + X End Function
A.21
B.19
C.17
D.34
第1题:
单击命令按钮时,下列程序的执行结果为 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
第2题:
单击命令按钮时,下列程序的执行结果为 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
A.12 32
B.2 32
C.2 3
D.12 3
第3题:
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。
Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y
As Single)
Print"VB Program"
End Sub
A.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程
B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程
C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程
D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程
第4题:
在窗体上有一个名称为Command1的命令按钮,并有如下程序:程序执行时,单击命令按钮Command1三次后,窗体上显示的结果为( )。
A. 5 16
B. 5 6
C. 15 15
D. 15 6
第5题:
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"VB Program" End Sub
A.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程
B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程
C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程
D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程
第6题:
阅读程序: Function F(a As-Integer) b=0 Static c b=b+1 c=c+1 F=a+b+c End Function Private Sub Command1_Click() Dim a As Integer a=2 For i=1 To 3 Prim F(A)Next i End Sub 运行上面的程序,单击命令按钮,输出结果为 ______。
A.4 4 4
B.4 5 6
C.4 6 8
D.4 7 9