Private Sub g(f As Form,x As Integer)
y=Iif(x>10,100,-100)
f.Show
f.Caption=y
End Sub
运行以上程序,正确的结果是(B)(单)
A.Form1的Caption属性值为100
B.Form2的Caption属性值为-100
C.Form1的Caption属性值为-100
D.Form2的Caption属性值为100
6.在窗体上画一个名称为Command1的命令按钮,并编写如下程序:
Private Sub Command1_Click( )
Dim x As Integer
Static y As Integer
x=10
y=5
Call f1(x,y)
Print x,y
End Sub
Private Sub f1(ByRef x1 As Integer, y1 As Integer)
x1=x1+2
y1=y1+2
End Sub
程序运行后,单击命令按钮,在窗体上显示的内容是(D)(单)
A.10 5
B.12 5
C.10 7
D.12 7
7.Option Base 1
Private Sub Command1_Click( )
Dim a(10) As Integer
Dim n As Integer
n=3
If n<10 Then
Call GetArray(a,n)
End If
End Sub
Private Sub GetArray(b( ) As Integer,n As Integer)
Dim c(10) As Integer
j=0