假定有以下函数过程: 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 Str1=Input Box(“请输入一个字符串”) Str2=Fun(Str1) Print Str2 End Sub 程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定”按钮后在窗体上的输出结果为A.abedergB.ABCDEFGC.gfedcbaD.GFEDCBA
假定有以下函数过程: 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 Str1=Input Box(“请输入一个字符串”) Str2=Fun(Str1) Print Str2 End Sub 程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定”按钮后在窗体上的输出结果为
A.abederg
B.ABCDEFG
C.gfedcba
D.GFEDCBA
相关考题:
设有如下通用过程:Public Function Fun(xStr As String)Dim tStr As String, srtL 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=tStrEnd Function在窗体上画一个名称为 Textl 的文本框和一个名称为 Command1 的命令按钮,然后编写如下的事件过程:Private Sub Command 1_ Click()Dim S1 As StringS1="abcdef"Text1.Text=UCase(Fun(S1))End Sub程序运行后,单击命令按钮,则Text1中显示的是( )。 A.ABCDEFB.abcdefC.AFBECDD.DEFABC
( 27 )设有如下通用过程:Public 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 = tStrEnd Function在窗体上画一个名称为 Text1 的文本框和一个名称为 Command1 的命令按钮。然后编写如下的事件过程:Private Sub Command1_Click()Dim S1 As StringS1 = "abcdef"Text1.Text = UCase(Fun(S1))End Sub程序运行后,单击命令按钮,则 Text1 中显示的是A ) ABCDEFB ) abcdefC ) AFBECDD ) DEFABC
下列程序的执行结果为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
(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
(33)假定有以下函数过程:Function Fun(S As String)As StringDim s1 As StringFor i=1 To Len(S)s1=LCase(Mid(S, i, 1))+s1Next iFun=s1End Function在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click( )Dim Str1 As String, Str2 As StringStr1=InputBox("请输入一个字符串")Str2=Fun(Str1)Print Srt2End Sub程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定”按钮后在窗体上的输出结果为( )。A)ABCDEFGB)abcdefgC)GFEDCBAD)gfedcba
( 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
设有如下通用过程: Public Function Fun(xStr As String)As String Dim tStr As String,strL As Integer tStr="" strL=Len(xStr) i=1 Do While i<=strL/2 tStr=tStr Mid(xStr,i,1) Mid(xStr,strL-i+1,1) i=i+1 Loop Fun=tStr End Function 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim S1 As String S1="abcdef" Text1.Text=UCase(Fun(S1)) End Sub 程序运行后,单击命令按钮,则Text1中显示的是______。A.ABCDEFB.abcdefC.AFBECDD.DEFABC
假定有以下函数过程: Function Fun(S As String) As String Dim sl As String For i=1 To Len(S) s1=UCase (Mid(S,i,1))+s1 Next i Fun=s1 End Function则Str2=Fun("abcdefg”)的输出结果为( )。A.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA
设有如下通用过程: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
假定有以下函数过程:Function Fun(S As String)As StringDim sl As StringFori=1 ToLen(S)sl=Lease(Mid(S,i,1))+s1NextiFun=s1End Function在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl Click(、Dim Str1 As String.Str2 As StringStrl=InputBox(”请输入一个字符串”)Stf2=Fun(Strl)Print Str2End Sub程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定”按钮后在窗体上的输出结果为A.ABCDEFGB.abcdefgC.GFEDCBAD.gfedcba
以下是替换字符串中制定字符的函数过程: Function sReplace (SearchLine As String,SearchFor As String,Replace With As String) As String Dim vSearchLine As String,found As Integer found=InStr (SearchLine,SearchFor):vSearchLine=SearchLine If found <>0 Then vSearchLine=" " If found>1 Then vSearchLine=Left (SearchLine,found -1) vSearchLine=vSearchLine+ReplaceWith End If If(表达式)<Len(SearchLine)Then vSearchLine=vSearchLine+Rights (SearchLine,Len (SearchLine) ―found―Len(SearchFor)+1) End If End If sReplace=vSeachLine End Function过程中的“表达式”应为( )。A.foundB.found-1C.found+Len(SearchFor)D.found+Len(SearchFor)-1
假定有以下函数过程: 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
设有如下通用过程:Public Function Fun (xStr As String) As String Dim tStr As String,strL As Integer tStr=-" " strL=Len(xStr) i=strL/2 Do Whilei<=strL tStr=tStr id(xStr,i+1,1) i=i+1 Loop Fun=tStr tStrEnd Function 在窗体上画—个名称为Text1的文本框和—个名称为Command1的命令按钮,然后编写如下的事件过程:Private Sub Command1_ Click() Dim S1 String S1="ABCDEF" Text1.Text=LCase(Fun(S1))End Sub 程序运行后,单击命令按钮,文本框中显示的是 ______。A.ABCDEFB.abcdefC.defdefD.defabc
设有下列通用过程: Public Function Fun(xStr As String)As String Dim tStr As String,strL As Integer tStr="" strL=Len(xStr) i=strL/2 DO While i=StrL tStr=tStr&Mid(xStr,i+1,1) i=i+1 Loop Fun=tStr&tStr End Function 在窗体上画一个名称为Textl的文本框和一个名称为Command1的命令按钮。然后编写下列的事件过程: Private Sub Commandl Click( ) Dim S1 As String S1="ABCDEF" Text1.Text=LCase(Fun(S1)) End Sub 程序运行后,单击命令按钮,文本框中显示的是( )。A.ABCDEFB.abedefC.defdefD.defabc
假定有以下函数过程: Function Fun(S As String)As String Dimsl As String Fori=1 To Len(S) s1=UCase(Mid(S,i,1))+s1 Nexti Fun=s1 End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() DimStrl As String,Str2 As StrA.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA
假定有以下函数过程:Function Fun(S As String)As StringDim Sl AS StringFor i=1 TO Len(S)sl=UCase(Mid(S,i,1))+slNext iFun=s1End Function则Str2= Fun("abcdefg")的输出结果为( )。A. abcdefg B.ABCDEFGC.gfedcba D.GFEDCBA
编写如下事件过程: 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 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
函数过程如下: FUNCTION FUN( N AS STRING)AS STRING DIM N1 AS STRING FOR I=1 TO LEN(N) N1 =UCASE(MID(N,I, 1)) + N1 NEXT I FUN: N1 END FUNCTION 则S=FUN("uvwxyz")的输出结果为( )。A.uvwxyzB.zyxwvuC.UVWXYZD.ZYXWVU
设有下列通用过程: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在窗体上画一个名称为Textl的文本框和一个名称为Command1的命令按钮。然后编写下列的事件过程:Private Sub Commandl Click( )Dim S1 As StringS1=ABCDEFText1.Text=LCase(Fun(S1))End Sub程序运行后,单击命令按钮,文本框中显示的是( )。A.ABCDEFB.abedefC.defdefD.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
下列程序的执行结果为 Ptivate Sub Commandl_Click() Dim FirStr As String FirStr="abcdef" Print Pct (FirStr) End Sub Private Function Pct(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,l) + Mid(xStr,strLen - i+i ,1) i=i + 1 Loop Pct=tempStr End FunCtionA.abcdefB.afbecdC.fedcbaD.defabc
下列程序的执行结果为 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
下列程序的执行结果为 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
若输入 "I am a boy!",下列程序的运行结果为______。 char connect(string1,string2,string) char string1[],string2[],string[]; { int i,j; for (i=0;stringl[i] !='\0';i++) string[i]=stringl[i]; for (j=0;string2[j] !='\0';j++) string[i+j]=string2[j]; string[i+j ] ='\0'; } main ( ) { char s1 [100] , s2 [100] , s [100]; printf ("\n 输入 string1: \n"); scanf("%s",s1); printf (" \n 输入 string2: \n" ); scanf ("%s", s2); connect (s1, s2, s); printf ("%s\n", s); }A.I am a boy!B.输入string2:C.I amD.I am a boy!