[单项选择题] 编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String)Dim xt As StringDim i As Intege

15 查阅

[单项选择题] 编写如下事件过程:

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

参考答案:

A解析:[分析]: 可以看出,Sub1(ByVal x1 As String,y1 As String)的作用是将参数x1的字符逆序处理,然后赋给y1,而y1是传址引用的,可以直接返回处理结果。

计算机考试