单项选择题
在窗体上画一个命令按钮,然后编写如下程序:
Sub S1(ByVal x As Integer,ByVal y As Integer)
Dim t As Integer
t=x
x=y
y=t
End Sub
Private Sub Command1_Click()
Dim a As Integer,b As Integer
a=10
b=30
S1 a,b
Print"a=";a;"b=";b
End Sub
程序运行后,单击命令按钮,输出结果是 ______。
A.a=30 b=10
B.a=30 b=30
C.a=10 b=30
D.a=10 b=10
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
以下程序段运行的结果是 ______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print j
A.20
B.7
C.35
D.8
点击查看答案&解析
单项选择题
在窗体上画两个标签和一个命令按钮,其名称分别为Labell、Label2和Command1,然后编写如下程序: Private Sub func(L As Label,ByVal a As Integer) L.Caption= 1234 a=a*a End Sub Private Sub Form_Load() Label1.Caption= ABCD Label2.Caption=10 End Sub Private Sub Command1_Click() a=Val(Label2.Caption) Call func(Labell,
A.
Label2.Caption=a
End Sub
程序运行后,单击命令按钮,在两个标签Label1和Label2中显示的内容分别是 ______。A) ABCD和10
B.1234和100
C.ABCD和100
D.1234和10
点击查看答案&解析
相关试题
在窗体上画一个文本框,一个命令按钮和一个...