问题
单项选择题
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String)Dim xt As StringDim i As Integeri = Len(x1)Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1Loopy1 = xt End Sub Private Sub Form Click()Dim s1 As String, s2 As Strings1= "teacher"sub1 s1, s2Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.rehcaet
B.tahreee
C.themee
D.eerthea
答案
参考答案:A
解析:
[分析]: 可以看出,Sub1(ByVal x1 As String,y1 As String)的作用是将参数x1的字符逆序处理,然后赋给y1,而y1是传址引用的,可以直接返回处理结果。