网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有字符串'hello',下列索引能够提取出'ell'的()
A.'hello'[1]
B.'hello'[3]
C.'hello'[1:4]
D.'hello'[-4:-2]
参考答案和解析
hello[1:4];hello[-4:-2]
更多 “有字符串'hello',下列索引能够提取出'ell'的()A.'hello'[1]B.'hello'[3]C.'hello'[1:4]D.'hello'[-4:-2]” 相关考题
考题
下列程序执行后,字符串s应是 String greets="hello"; String s=greets.substring(0,3);A.elloB.hellC.helloD.hl
考题
不能把字符串“Hello!”赋给数组的语是 ______。A.char b[10]={'H' ,' e' ,'1', '1', 'o' ,' !'};B.char b[10];b=" Hello!" ;C.char b[10];strcpy(b,"Hello!");D.char b[10]="Hello!"
考题
以下能正确进行字符串赋值操作的是______。A.char *sss;*sss="hello!";B.char *sss;sss="hello!";C.char sss[8];sss="hello!";D.char sss[8];*sss="hello!";
考题
以下能从字符串“VisualBasic”中直接取出子字符串“Basic”的函数是( )。A.LeftB.MidSX
以下能从字符串“VisualBasic”中直接取出子字符串“Basic”的函数是( )。A.LeftB.MidC.StringD.Instr
考题
下列程序的功能是在监控台上每隔一秒钟显示一个字符串"Hello!",能够填写在程序中下划线位置,使程序完整并能正确运行的语句是publicclassTestimplementsRunnable{publicstaticvoidmain(Stringargs[]){Testt=newTest();Threadtt=newThread(t);tt.start();}publicvoidrun(){for(;;){try{}catchL______e){}System.out.println("Hello");}}}A.B.C.D.
考题
在C语言中,关于字符串描述错误的是( )。A.C中的字符串是作为字符数组来处理的B.C语言规定:以‘\0’作为字符串结束标志C.char str[]={"hello\nworld!"}; puts(str); 输出: hello\n world!D.可以利用strlen(字符数组)测试字符串的长度
考题
在C语言中,利用数组a存放字符串“Hello”,以下语句中正确的是()。Achara[10]=“Hello”;Bchara[10];a=“Hello”;Cchara[10]=‘Hello’;Dchara[10]={‘H’,’e’,’l’,’l’,’o’};
考题
在J2EE中,在自己定义的JavaBean中,有方法getComment(),返回字符串“hello!”,但是没有comment属性,当调用getComment()方法时会()。 A、抛出异常B、返回字符串“hello!”C、什么也没有D、编译不能通过
考题
不能把字符串“Hello!”赋给数组b的语句是()A、char b[10]={’H’,’e’,’l’,’l’,’o’,’!’};B、char b[10];b="Hello!";C、char b[10];strcpy(b,"Hello!");D、char b[10]="Hello!";
考题
单选题SQL server提供了一些字符串函数,以下说法错误的是()。A
selectright(’hello’,3)返回值为:helB
selectltrim(rtrim(’hello’))返回值为:hello(前后都无空格)C
selectreplace(’hello’,’e’,’o’)返回值为:holloD
selectlen(’hello’)返回值为:5
考题
单选题在C语言中,利用数组a存放字符串“Hello”,以下语句中正确的是()。A
chara[10]=“Hello”;B
chara[10];a=“Hello”;C
chara[10]=‘Hello’;D
chara[10]={‘H’,’e’,’l’,’l’,’o’};
考题
单选题在J2EE中,在自己定义的JavaBean中,有方法getComment(),返回字符串“hello!”,但是没有comment属性,当调用getComment()方法时会()。A
抛出异常B
返回字符串“hello!”C
什么也没有D
编译不能通过
热门标签
最新试卷