当前位置: 高中信息技术 / 单选题
  • 1. (2020·浙江模拟) 自定义函数delStr(S,m)的功能是删除字符串S中第m位上的字符,

    Function delStr(S As String, m As Integer) As String

    Dim n As Integer

    n = Len(S)

    If m < 1 Or m > n Then

    delStr = ”输入位置有误!”

    ElseIf m = 1 Then

    delStr = Mid(S, 2, n - 1)

    ElseIf m < n Then

                     

    ElseIf m = n Then

    delStr = Mid(S, 1, n - 1)

    End If

    End Function

    则横线处代码填写正确的是(  )

    A . delStr = Mid(S, 1, m) + Mid(S, m + 1, n) B . delStr = Mid(S, 1, m - 1) + Mid(S, m , n) C . delStr = Mid(S, 1, m) + Mid(S, m, n - m) D . delStr = Mid(S, 1, m - 1) + Mid(S, m + 1, n - m)

微信扫码预览、分享更方便