以下程序:
PublicSubSwap1(ByValxAsInteger,ByValyAsInteger)
DimtAsInteger
t=x:x=y:y=t
EndSub
PublicSubSwap2(xAsInteger,yAsInteger)
DimtAsInteger
t=x:x=y:y=t
EndSub
PrivateSubCommand1_Click()
DimaAsInteger,bAsInteger
a=10:b=20
Swap1a,b
Print"A1=";a,"B1=";b
a=10:b=20
Swap2a,b
Print"A2=";a,"B2=";b
EndSub
当单击命令按钮后,窗体上输出的结果是( )
A.A1=20B1=10A2=10B2=20
B.A1=10B1=20A2=20B2=10
C.A1=10B1=20A2=10B2=10
D.A1=20B1=20A2=20B2=10
第1题:
设有如下程序:
Prirate Sub Form_Click()
Dim a As Integer,b AS Integer
a=20:b=50
p1 a,b
p2 a,b
p3 a,b
Print"a=";a,"b=";b
End Sub
Sub p1(x As Integeh By Val y As Integer)
x=x+10
y=y+20
End Sub
Sub p2(ByVal x As Integer,y As Integer)
x=x+10
y=y+20
End Sub
Sub p3 (ByVal x As Integer,ByVal y As Integer)
x=x+10
y=y+20
End Sub
该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。
第2题:
在VB.NET中,以下正确的过程定义形式是()。
A.Sub proc(ByVal x as Integer;ByValy as Integer)
B.Sub proc(ByVal x as Integer,ByValy as Integer)
C.Sub proc(x as Integer;y as Integer);
D.Sub proc(x,y as Integer)
第3题:
2、在VB.NET中,以下正确的函数定义形式是()。
A.Function fun(ByVal x as Integer;ByValy as Integer)
B.Function fun(ByVal x as Integer,ByValy as Integer)
C.Function fun(x as Integer;y as Integer);
D.Function fun(x,y as Integer)
第4题:
要想在过程Proc调用后返回形参x和Y的变化结果,下列定义语句中正确的是( )。【考点5过程调用与参数传递】
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)
第5题:
1、在VB.NET中,以下正确的过程定义形式是()。
A.Sub proc(ByVal x as Integer;ByValy as Integer)
B.Sub proc(ByVal x as Integer,ByValy as Integer)
C.Sub proc(x as Integer;y as Integer);
D.Sub proc(x,y as Integer)