单选题
VB
题号 #2271013
执行下列程序段
a$="visual Basic Programming"
b$="C++"
C$=UCase(Left$(a$,7))&b$&Right$(a$,1 2)后,变量c$的值为( )。
参考答案
B
答案解析
B。【解析】Left$(字符串,个数)函数用于取出已有字符串最左边指定个数的字符串;Right(字符串,个数)函数用于取出已有字符串最右边指定个数的字符串;UCase()函数用于将字符串中小写字母转化为大写字母,原本大写或非字母字符保持不变;&运算符用来强制两个表达式作字符串连接。
本题中UCase(Left$(a$,7))=UCase("Visual")=”VISUAL,Right$(a$,12)="Programming",故答案为选项B。
本题中UCase(Left$(a$,7))=UCase("Visual")=”VISUAL,Right$(a$,12)="Programming",故答案为选项B。
你可能感兴趣的试题
A.MsgBox语句的返回值是一个整数
B.执行MsgBox,语句并出现信息框后,不用关闭信息框即可执行其他操作
C.MsgBox语句的第一个参数不能省略
D.如果省略MsgBox语句的第三个参数(Title),则信息框的标题为空
A.Private Sub Text1 Change( )
Labe11.Caption=Str(Len(Text1.Text))
End Sub
Labe11.Caption=Str(Len(Text1.Text))
End Sub
B.Private Sub Text1 Click( )
Labe11.Caption=str(Len(Text1.Text))
End Sub
Labe11.Caption=str(Len(Text1.Text))
End Sub
C.Private Sub Text1 Change( )
Labe11.Caption=Text1.Text
End Sub
Labe11.Caption=Text1.Text
End Sub
D.Private Sub Labe1 1_Change( )
Labe11.Caption=Str(Len(Text1.Text))
End Sub
Labe11.Caption=Str(Len(Text1.Text))
End Sub
A.Option1.value=False
Checkl.Vaim=True
Checkl.Vaim=True
B.Option1.Value=True
Check1.Value=0
Check1.Value=0
C.Olption2.Value=False
Check1.Value=2
Check1.Value=2
D.Option1.Value=True
Check1.Value=1
Check1.Value=1
