编写如下事件过程: Option Explicit Private Sub Form_Click() Dim Str As String, I As Integer Open "examp" For Output As 1 For I=1 To 5 Str=Chr(I+64) Print #1,Str; Next I Close 1 Open”examp',For lnput AS 2 Str=Input(10,#2) Print Str; Close 2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.ABCDE
B.96
C.65
D.abcde
第1题:
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮。然后编写如下的事件过程: Private Sub Commandl_Click() Dim arr(5)As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是______。
A. 30
B.25
C.20
D.15
第2题:
在窗体中添加一个名称为C1的命令按钮,然后编写如下事件代码: Private SubC1_click() str="ABAABAAABABBA" For i=6 Ti 2 Step-2 x=Mid(str,i,i) y=Lefi(str,i) z=mght(str,i) Next i MsgBox x&y&z
A.ABBAAB
B.ABBABA
C.BABABA
D.BAABBA
第3题:
在窗体上画一个命令按钮,然后编写如下事件过程:
Sub BTC(oldCopy() As Integer, newCopy() As Integer)
Dim i As Integer
For i=LBound(oldCopy() ) To UBound(oldCopy() )
newCopy(i) =oldCopy(i)
Next i
End Sub
Private Sub Command1_Click()
Dim m(10) As Integer, n(10) As Integer
For i=1 To 10
m(i) =i i
Next i
Call BTC(m, n)
Print n(5)
End Sub
程序运行后,单击命令按钮输出结果为( )。
A.0
B.2
C.10
D.25
第4题:
在窗体上画一个命令按钮,然后编写如下事件过程: Sub BTC(old Copy( ) As Integer,new Copy( ) As Integer) Dim i AS Integer For i=LBound(oldCopy( ))To UBound(oldCopy( )) newCopy(i)=oldCopy(i) Next i End Sub Private Sub Command1 _ Click( ) Dimm(10) As Integer,n(10)As Integer For i=1 To 10 m(i) =i*i Next i Call BTC(m,n) Print n(5) End Sub 程序运行后,单击命令按钮输出结果为
A.0
B.2
C.10
D.25
第5题:
在窗体中添加一个名称为C1的命令按钮,然后编写如下事件代码: Private Sub C1_Click() str=“ABAABAAABABBA” For i=6 To 2 Step-2 x=Mid(str,i,i) y=Left(str,,i) z=Right(str,i) Next i Msg Box x&y&z End Sub 单击命令按钮,则消息框的输出结果是( )。
A.ABBAAB
B.ABBABA
C.BABABA
D.BAABBA
第6题:
设有如下通用过程:
Public Sub Fun(a() As Integer, x As Integer)
For i = 1 To 5
x = x + a(i)
Next
End Sub
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程:
Private Sub Command1_Click()
Dim arr(5) As Integer, n As Integer
For i = 1 To 5
arr(i) = i + i
Next
Fun arr, n
Text1.Text = Str(n)
End Sub
程序运行后,单击命令按钮,则在文本框中显示的内容是( )。
A.30
B.25
C.20
D.15
第7题:
设有如下通用过程: Public Sub Fun(a( )As Integer,x As Integer) For i=1 TO 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Cliek( ) Dim arr(5) As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是
A.30
B.25
C.20
D.15
第8题:
设有如下通用过程: Public Sub Fun(a() As Integer, x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5)As Integer, n As Integer For i=1 To 5 art(i)=i+i Next Fun arr, n Text1. Text=Str(n) End Sub 程序运行后,单击命令按钮,在文本框中显示的内容是______。
A.30
B.25
C.20
D.15
第9题:
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.rehcaet
B.tahreee
C.themee
D.eerthea
第10题:
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上绘制一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5) As Integer,n AsInteger For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是( )。
A.30
B.25
C.20
D.15