单选题
VB
题号 #151600
有如下程序段:
Private Sub Command1_Click()
Dim a As Integer
a=2
For i=1 To 3
Print G(A.
Next i
End Sub
Function G(a As Integer)
b=0
Static c
b=b + 1
c=c + 1
G=a + b + c
End Function
运行上面的程序后,单击命令按钮,输出结果为( )。
参考答案
C
答案解析
暂无解析
你可能感兴趣的试题
A.0
B.1
C.3
D.5
A.22
B.44
C.55
D.66
A.Function CT(ByVal a As Integer)
If a Mod 2=0 Then
Return 0
Else
Return 1
End if
End Function
If a Mod 2=0 Then
Return 0
Else
Return 1
End if
End Function
B.Function CT(ByVal a As Integer)
If a Mod 2=0 Then
CT=0
Else
CT=1
End if
End Function
If a Mod 2=0 Then
CT=0
Else
CT=1
End if
End Function
C.Function CT(ByVal a As Integer)
If a Mod 2=0 Then
CT=1
Else
CT=0
End if
End Function
If a Mod 2=0 Then
CT=1
Else
CT=0
End if
End Function
D.Function CT(ByVal a As Integer)
If a Mod 2=0 Then
Return 1
Else
Return 0
End if
End Function
If a Mod 2=0 Then
Return 1
Else
Return 0
End if
End Function