有如下程序段: Dim str As String *10 Dim i Str1="abcdefg" i=12 len1=Len(i) str2=Right(str1,4) 执行后,len1和str2的返回值分别为( )。

admin2013-01-20  9

问题 有如下程序段:
Dim str As String *10
Dim i
Str1="abcdefg"
i=12
len1=Len(i)
str2=Right(str1,4)
执行后,len1和str2的返回值分别为(          )。

选项 A、12,abcd
B、10,bcde
C、2,defg
D、0,cdef

答案C

解析 Len()是计算字符表达式的字符个数,i为12,因此长度是2。Right()表示从字符串右起取所指定的字符数,本题为从右取4个字符,为"defg"。因此选项C正确。
转载请注明原文地址:https://kaotiyun.com/show/CVup777K
0

随机试题
最新回复(0)