更多"在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为,( "的相关试题:
[单项选择]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。
Private Function fun(x As Integer,y As Integer)
Static m As Integer
Static i As Integer
i=i+2
i=i+m+1
m=i+x+y
fun=m
End Function
Private Sub Command1_Click( )
Dim j As Integer,m As Integer,k As Integer
j=4:m=1
k=fun(j,m)
Print k;
k=fun (j,m)
Print k
End Sub
A. 8 18
B. 7 17
C. 7 19
D. 8 19
[单项选择]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。
Private Sub fun3(x As Integer)
Static a As Integer
Dim b As Integer
a=a+3:b=b+3
a=a+x:b=b+x
Printa;b
End Sub
Private Sub Command1_Click( )
Dim k As Integer,m As Integer,n As Integer
k=2:m=1
Call fun3(k)
Call fun3(m)
End Sub
A. 5 5
B. 5 5
C. 5 5
D. 5 5
[单项选择]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为,( )。
Private Sub fun(ByVal x As Integer,ByVal y As Integer,Byval z As Integer)
z=x^3*y^3
End Sub
Private Sub Command1_Click( )
Dim m As Integer
Call fun(2,3,m)
Print m
End Sub
A. 216
B. 0
C. 35
D. 程序不能运行
[单项选择]在窗体上画一个命令按钮,然后编写如下代码: Private Type Record ID As Integer Name As String * 20 End Type Private Sub Command1_Click( ) Dim MaxSize, NextChar, MyChar Open "d:/vb/tt. txt" For Input As #1 MaxSize = LOF(1) For NextChar = MaxSize To 1 Step - 1 Seek # 1, NextChar MyChar = Input(1, # 1) Next NextChar Print EOF(1) Close $1 End Sub 假设文件d:/vb/tt. txt 的内容为 Hello eveybody! 那么程序运行后,单击命令按钮,其输出结果为 ______。
A. True
B. False
C. 0
D. Null
[单项选择]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Option Base 1 Private Sub fun(a( )As Integer,n As Integer) ReDim Preserve a(6) a(6)=a(1)*a(3)*a(5) n=UBound(a) End Sub Private Sub Command1_Click( ) Dim arr1( )As Integer,k As Integer ReDimarrl(5) For i=1 To 5 arrl(i)=i Next i k=6 Call fun(arrl,k) Print arrl(1);arrl(k) End Sub
A. 1 3
B. 0 0
C. 1 15
D. 0 15