[填空题] 执行下面程序,单击按钮CmdRun,窗体上显示的第一行结果是(),UBound(a)的值为(),其中a(1)的值为().Option ExplicitPrivate Sub CmdRun_
19 查阅
[填空题] 执行下面程序,单击按钮CmdRun,窗体上显示的第一行结果是(),UBound(a)的值为(),其中a(1)的值为().Option ExplicitPrivate Sub CmdRun_Click()Dim St As String,i As IntegerDim a() As String,j As Integer,k As IntegerSt="abcd"Call Sub1(St)Print StFor i=1 To Len(St)For j=i+1 To Len(St)If Mid(St,i,1)=Mid(St,j,1) Then Exit ForNext jIf j>Len(St) Thenk=k+1ReDim Preserve a(k)a(k)=Mid(St,i,1)Print "a(";k;")=";a(k)End IfNext iEnd SubPrivate Sub Sub1(S As String)Dim i As IntegerFor i=1 To Len(S)2Mid(S,i,1)=Mid(S,Len(S)-i+1,1)Next iEnd Sub
参考答案: