设有如下通用过程: Public Function Fun(xStr As String)As String    Dim tStr As String, strL As Integer    tStr=""    strL=Len(xStr)    i=

admin2015-08-28  32

问题 设有如下通用过程:
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
在窗体上画一个名称为Command1的命令按钮。然后编写如下的事件过程:
Private Sub Command1_Click()
   Dim S1 As String
   S1="abcdef"
   Print UCase(Fun(S1))
End Sub
程序运行后,单击命令按钮,输出结果是(  )。

选项 A、ABCDEF
B、abcdef
C、AFBECD
D、DEFABC

答案C

解析 通用过程Fun的主要功能在于
转载请注明原文地址:https://kaotiyun.com/show/QYQp777K
0

最新回复(0)