运行下列程序:Private Sub Command1_Click( )Dim s1 As String * 1Dim s2 As Strings1 = aFor i = Asc(s1) To Asc(s1) + 4s2 = s2 Chr(i)Next iPrint s2End Sub单击Command1命令按钮后,则在窗体上显示的结果是( )。A.aB.abcdeC.aaaaD.s2

运行下列程序:Private Sub Command1_Click( )Dim s1 As String * 1Dim s2 As Strings1 = &quo

运行下列程序:

Private Sub Command1_Click( )

Dim s1 As String * 1

Dim s2 As String

s1 = "a"

For i = Asc(s1) To Asc(s1) + 4

s2 = s2 & Chr(i)

Next i

Print s2

End Sub

单击Command1命令按钮后,则在窗体上显示的结果是( )。

A.a

B.abcde

C.aaaa

D.s2


相关考题:

下面运行程序后,单击命令按钮,输出的结果是______。Private Sub Commandl_clck()Dim a%(1 To 4),b%(3 To 6),i%,s1,s2Fori=1 To 4a(i)=iNextiFor i=3 To 6b(i)=iNextis1=YAS(a)S2=YAS(b)Printt"s1=";S1"S2=";s2End Sub

下列程序的执行结果为Private Sub Command1_Click()Dim s1 As String, s2 As Strings1= "abcd"Call Transfer(s1, s2)Print s2End SubPrivate Sub Transfer (ByVal xstr As String, ystr As String)Dim tempstr As Stringi=Len(xstr)Do While i =1tempstr=tempstr + Mid(xstr, i, 1)i=i - 1Loopystr=te mpstrEnd Sub( )。A.dcbaB.abdcC.abcdD.dabc

单击窗体时,下列程序的执行结果是Private Sub Invert(ByVal xstr As String, ystr As String)Dim tempstr As StringDim I As IntegerI=Len(xstr)Do While I =1tempstr=tempstr + Mid(xstr, I, 1)I=I - 1Loopystr=tempstrEnd SubPrivate Sub Form_Click()Dim s1 As String, s2 As Strings1= "abcdef"Invert s1, s2Print s2End Sub( )。A.abcdefB.afbecdC.fedcbaD.defabc

在窗体上画一个命令按钮,然后编写如下程序: Sub S1(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Private Sub Command1_Click() Dim a As Integer,b As Integer a=10 b=30 S1 a,b Print"a=";a;"b=";b End Sub 程序运行后,单击命令按钮,输出结果是 ______。A.a=30 b=10B.a=30 b=30C.a=10 b=30D.a=10 b=10

(31)设有如下通用过程:Public Function Fun(xStr As String)As StringDim tStr As String, strL As IntegertStr=""strL=Len(xStr)i=1i=i+1LoopFun=tStrEnd Function在窗体上画一个名称为 Command1 的命令按钮。然后编写如下的事件过程:Private Sub Command1_Click( )Dim S1 As StringS1="abcdef"Print UCase(Fun(S1))End Sub程序运行后,单击命令按钮,输出结果是( )。A)ABCDEFB)abcdefC)AFBECDD)DEFABC

( 30 )有如下通用过程:Public Function Fun(xStr As String) As StringDim tStr As String ,strL As IntegertStr= ” ”strL=Len(xStr)i=strL/2Do While i=strLtStr=tStr Mid(xStr,i+1,1)i=i+1LoopFun=tStr tStrEnd Function在窗体上画一个名称为 Text1 的文本框和一个名称为 Command1 的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim S1 As StringS1= ” ABCDEF ”Text1.Text=Lcase(Fun(S1))End Sub程序运行后,单击命令按钮,文本框中显示的是A ) ABCDEFB ) abcdefC ) defdedD ) defabc

在窗体上画一个命令按钮和两个文本框,其名称分别为Command1、Text1和Text2,然后编写如下程序: Dim S1 As String,S2 As String Private Sub Form_Load() Text1.Text="" Text2.Text="" End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) S2=S2 Chr(Keycode) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) S1=S1 Chr(KeyAscii) End Sub Private Sub Command1_Click() Text1.Text=S2 Text2.Text=S1 S1="" S2="" End Sub 程序运行后,在Text1中输入“abc”,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为______。A.abc和ABCB.abc和abeC.ABC和abcD.ABC和ABC

(14)有下列程序,程序运行后单击命令按钮,则输出的结果是 Private Sub Command1_Click() Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(a) S2=Factorial(b) Print"s1=";s1;"s2";s2; End Sub Function Factorial(a()As Integer) Dim t#,i% t=1 For i=LBound(a) To UBound(a) t=t*a(i) Next i Factorial=t End Factorial A.s1=360 s2=24 B.s1=24 s2=360 C.s1=24 s2=24 D.s1=360 s2=360

下列程序的执行结果为 Private Sub Command1_Click Dim FirStr As String FirSt="abcdef" Print Pat(FirStr. End Sub Private Function Pat(xStr As String.As String Dim tempStr As String, strLen As Integer tempStr="" strLen=Len(xStr. i=1 Do While i=Len(xStr.-3 tempStr=tempStr+Mid(xStr, i, 1)+Mid(xStr, strLen -i+1, 1) i=i+1 Loop Pat=tempStr End FunctionA.abcdefB.afbecdC.fedcbaD.defabc

设有如下通用过程:Pubfic Function Fun(xStr As String)As StringDim tStr As String,strL As Integertstr=“”strL=Len(xStr)i=1Do While i=strL/2tStr=tStr&Mid(xStr,i,1)&Mid(xStr,strL-i+1,1)i=i+1LoopFun=tStrEndFunction在窗体上画一个名称为Commandl的命令按钮。然后编写如下的事件过程:Private Sub Commandl_Click()Dim S1 As StringS1=“abcdef”Print UCase(Fun(S1))End Sub程序运行后,单击命令按钮,输出结果是A.ABCDEFB.abedefC.AFBECDD.DEFABC

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MSgBox x End Sub Private Sub s1() x=x+20 End Sub Private Sub s2() Dim x As Integer x=X+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为______。A.10B.30C.40D.50

假定有以下函数过程: Function Fun(S As String) As String Dim s1 As String For i=1 To Len(S) s1 = UCase(Mid(S, i, 1)) +s1 Next i Fun =s1 End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim Str1 As String, Str2 As String Strl = InputBox(“请输入一个字符串”) Str2=Fun(Str1) Print Str2 End Sub 程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定” 按钮后在窗体上的输出结果为,A.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA

下列程序的输出结果是【 】。Private Sub Command1_Click()Dim a(1 To 20)Dim iFor i=1 To 20a(i)=iNext iFor Each i In a()a(i)=20Next iPrint a(2)End Sub

若有以下程序,当程序运行后,单击命令按钮,则输出的结果为( )。 Private Sub Command1_Click() Dim a%(1 To 4), b%(3 To 6), i%, s1#, s2# For i= 1 To 4 a(i) = i Next i For i=3 To 6 b(i) = i Next i s1 = Factorial (A) s2 = Factorial (B) Print "s1="; s1; "s2="; s2 End Sub Function Factorial(a() As Integer) Dim t#, i% t=1 For i = LBound(A)To UBound(A) t = t * a(i) Next i Factorial = t End FunctionA.s1=360 s2=24B.s1=24 s2=360C.s1=24 s2=24D.s1=360 s2=360

有下列程序,程序运行后单击命令按钮,则输出的结果为( )。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(A) s2=Factorial(B)Print "s1=";s1;"s2=";s2End SubFunction Factorial(a()As Integer)Dim t#,i% t=1 For i=LBound(A)To UBound(A) t=t*a(i) Next i Factorial=tEnd FunctionA.s1=360 s2=24B.s1=24 s2=360C.s1=24 s2=24D.s1=360 s2=360

编写如下事件过程: 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.rehcaetB.tahreeeC.themeeD.eerthea

有下列程序,程序运行后单击命令按钮,则输出的结果是( )。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2#For i=1 To 4a(i)=iNext iFor i=3 To 6b(i)=iNext is1=Factorial(A)s2=Factorial(B)Print"s1=";s1;"s2=";s2End SubFunction Factorial(a() As Integer)Dim t#,i%t=1For i=LBound(A)To UBound(A)t=t*a(i)Next iFactorial=tEnd FunctionA.s1=360 s2=24B.s1=24 s2=360C.s1=24 s2=24D.s1=360 s2=360

单击命令按钮时,下列程序代码的执行结果为______。 Private Function PickMid(xStr As String) As String Dim tempStr As String Dim strLen As Integer tempStr=“” strLen=Len(xStr) i=1 Do While i<=strLen/2 tempStr=tempStr+Mid(xStr,i,1)+Hid(xStr,strLen-i+1,1) i=i + 1 Loop PickMid=tempStr End Function Private Sub Command1_Click() Dim FirstStr As String FirstStr=“abcdef” Print PickMid(FirstStr) End SubA.abcdefB.afbecdC.fedcbaD.defabc

单击窗体时,下列程序的执行结果是 Private Sub Invert(By Val xstr As String,ystr As String) Dim tempstr AS String Dim I AS Integer I=Len(xstr) Do While I>=1 tempstr=tempstr + Mid(xstr,I,1) I=I - 1 Loop ystr=tempStr End Sub Private Sub Form_Click( ) Dim s1 As String,s2 As String S1="abcdef" Invert S1,S2 Print S2 End SubA.abcdefB.afbecdC.fedcbaD.defabc

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MsgBox x End Sub Private Sub sl() x=x+20 End Sub Private Sub s2() Dim x As Integer x=x+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。A.10B.30C.40D.50

下列程序的执行结果为 Private Sub Command1_Click() Dim FirStr As String FtrSt="abcdef" Print Pat(FirStr) End Sub Private Function Pat(xStr As String)As String Dim tempStr As String,strLen As Integer tempStr="" strLen=Len(xStr) i=1 Do While i<=Len(xStr)-3 tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen -i+1,1) i=i+1 Loop Pat=tempStr End FunctionA.abcdefB.afbecdC.fedcbaD.defabc

下列程序的执行结果为 Private Sub Command1_C1ick( ) Dim sl As String,s2 AS String s1="abcdef" Call lnvert(s1,s2) Print s2 End Sub Private Sub lnvert(ByVal xstr As String,ystr As String) Dim tempstr As Stdng i=Len(xstr) Do While i>=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

运行下列程序:Private Sub form_Click( )Dim sl As String, s2 As Strings1 = "12341234m = 0For i = 3 To 1 Step -1m = m + 1s2 = fun1(s1, m)Debug.Print s2;Next iEnd SubPrivate Function fun1(x, y) As Stringfun1 = Right(x, y)End Function单击窗体后,则在立即窗口内显示结果是( )。A.1234B.4321C.434234D.1111

下列程序的执行结果为 Private Sub Command1_Click() Dim s1 As String,s2 As String S1;="abcdef" Call Invert(s1,s2) Print s2 End Sub Private Sub Invert (ByVal xstr As String,ystr As String) Dim tempstr As String i=Len(xstr) Do While i=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

有下列程序段,单击命令按钮执行程序后,输出结果为( )。 Option Base 1 Private Sub Command1_Click() Dim x x=Array(23,-5,17,38,-31,46,11,8,5,-4) s1=0 s2=0 For k=1 To 10 If(x(k)>0)Then s1=s1+x(k) Else s2=s2+x(k) End If Next k Y=s1/Abs(s2) Print Y End SubA.148B.40C.-40D.3.7

下列程序的执行结果为 Private Sub Commandl_Click() Dim s1 As String ,s2 As String s1= "abcd" Call Transfer(sl,s2) Print s2 End Sub Private Sub Transfer (ByVal xstr As String,ystr As String) Dim tempstr As String ystr=tempstr End SubA.dcbaB.abdcC.abcdD.dabc

下面运行程序后,单击命令按钮,输出的结果是【 】。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1,s2For i=1 To 4a(i)=iNextFor i=3 To 6b(i)=iNexts1.= Fun(a)s2 =Fun(b)Print "s1 ="; s1; "s2 ="; s2End SubFunction Fun( a( ) As Integer)Dim t, i%t=1For i = LBound(A)To UBound(a)t=t * a(i)NextFun=tEnd Function