1.
(2020高三上·浙江月考)
已知字符串s是由字母和数字组成的,现要用VB程序实现如下功能,将字符串中的数字字符按照原有顺序移动到s的左边,字母字符按照原有顺序移动到字符串右边,如s=“Su2cc0ess20”执行完程序后变成s=“2020Success”,为实现上述功能,在横线处填入的代码应该是( )
m=0: k=0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
k = k + 1
If ch >= "a" And ch <= "z" or ch >= "A" And ch <= "Z" Then
a(k) = ch
Else
m = m + 1: ①
Do While j > m
②
j = j - 1
Loop
③
End If
Next i
n = Len(s): s = ""
For i = 1 To n
s = s + a(i)
Next i
A . ①j=k ②a(j)=a(j-1) ③a(m) = ch
B . ①j=k ②a(j)=a(j+1) ③a(j+1)=ch
C . ①j=k-1 ②a(j)=a(j-1) ③a(m) = ch
D . ①j=k-1 ②a(j)=a(j-1) ③a(j+1)=ch