更多"下列程序的输出结果是 【15】 。
Private Sub Comm"的相关试题:
[单项选择]以下程序运行后,单击按钮输出结果是 Private Sub Commandl_Click( ) Dim x As Integer,y As Integer,z As Integer X=4:y=2: Z=3 Call Gopd(x,x,z) Print x;X;Z Call Gopd(x,y,y) Print x;y;y End Sub Private Sub Gopd(x As Integer,y As Integer,z As Integer) X=3 * Z + 1 y=2 * z z=x + y End Sub
A. 6 6 12 7 11 11
B. 8 5 10 5 11 11
C. 9 6 12 9 10 15
D. 8 10 10 5 9 10
[单项选择]单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End Sub
A. 6 6 12 7 11 11
B. 8 5 10 5 11 11
C. 9 6 12 9 10 15
D. 8 10 10 5 9 10
[填空题]下列程序的输出结果是______。
Private Sub Commandl_Click( )
Dim alt(1 To 10)
Fori=1 To 10
arr(i) =i
Next i
For Each i In arr( )
arr(i) =arr(i) *2+1
Next i
MsgBox arr(7)
End Sub
[填空题]下列程序输出的结果为 【12】 。
Private Sub Commandl_Click( )
Dim a As Boolean
a = True
If a Then GoTo 11 Else GoTo 22
11:
Print "VB";
22:
Print "VC"
End Sub
[单项选择]单击命令按钮时,下列程序的执行结果是
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
[单项选择]下面程序段,运行后的结果是 Private Sub Commandl_Click( ) Dim b%(1 To 4),i%,t# For i=1 To 4 b(i)=i Next i t=Tof(b( ) ) Print"t=";t, End Sub Function Tof(a( ) As Integer) Dim t#,i% t=1 For i=2 To UBound(
[单项选择]下面程序的运行结果是( )。
Private Sub Commandl_Click( )
a=1.5
b=1.5
Callfun(a,b)
Printa,b
End Sub
Private Subfun(x,y)
x=y*y
y=y+x
End Sub
A. 2.25 1.5
B. 1.5 2.25
C. 2.25 3.75
D. 0.75 1.5
[单项选择]下面程序段,运行后的结果是( )。
Private Sub Commandl_Click( )
Dim b%(1 To 4),i%,t#
For i=1 To 4
b(i)=i
Next i
t=Tof(b( ) )
Print"t=";t,
End Sub
Function Tof(a( ) As Integer)
Dim t#,i%
t=1
For i=2 To UBound(a)
t=t * a(i)
Next i
Tof=t
End Function
A. RunSQL
B. RunApp
C. Requery
D. Quit
[单项选择]有如下程序:
Private Sub Commandl_Click( )
Dim a As Integer
a=2
For i=1 To 3
Print Gad (a)
Next i
End Sub
Function Gad (a As Integer)
b=0
Static c
b=b + 1
c= c + 1
Gad= a + b + C
End Function
运行上面的程序后,单击命令按钮,输出结果为( )。
[单项选择]有如下程序:
Private Sub Commandl_Click( )
Dim i As Integer
For i=1 To 2
DS
Next i
End Sub
Sub DS( )
Dim x As Integer,m As String
Static y,n
X=X + 1
y=y + 1
m=m &"*”:n=n&"#"
Print x,y,m,n
End Sub
程序运行后,输出的结果是( )。
A. * p表示的是指针变量p的地址
B. p表示的是变量a的地址,而不是变量a的值
C. * p表示的是指针变量p的值
D. * p只能用来说明p是一个指针变量