网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
s=’hello world’,s[-4:]的值是()
- A、hell
- B、hello
- C、world
- D、orld
参考答案
更多 “s=’hello world’,s[-4:]的值是()A、hellB、helloC、worldD、orld” 相关考题
考题
publicclassX{publicstaticvoidmain(String[]args){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?()
A.Theprogramrunsandprints“Hello”B.Anerrorcausescompilationtofail.C.Theprogramrunsandprints“Helloworld!”D.Theprogramrunsbutabortswithanexception.
考题
publicclassX{publicstaticvoidmain(Stringargs){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?()
A.Theprogramrunsandprints“Hello”B.Anerrorcausescompilationtofail.C.Theprogramrunsandprints“Helloworld!”D.Theprogramrunsbutabortswithanexception.
考题
以下选项中正确的语句组是( )。A)char s[];s="HELLO!";B)char*s;s={"HELLO!"};C)char s[10];s="HELLO!";D)char *s;s="HELLO!";
考题
以下程序的输出结果是 ______。includevoid main(){ char s1[]=”Hello”,s2[]="World
以下程序的输出结果是 ______。 #include<iostream.h> void main(){ char s1[]=”Hello”,s2[]="World"; char *p1,*p2; int i; p1=s1; p2=s2; for(i=0;i<5;i++) if(*(pl+i)==*(p2+i)) cout<<*(p1+i); }A.H1B.HoC.10D.1
考题
以下选项中正确的语句组是( )。A.char s[]; s="HELLO!";B.char *s; s={"HELLO!"};C.char s[10]; s="HELLO!";D.char *s; s="HELLO!";
考题
写出程序运行的结果Public class BasePublic virtual string Hello() {return “Base”;}Public class Sub:BasePublic override string Hello() {return “Sub”;}1. Base b = new Base(); b.Hello;2. Sub s = new Sub(); s.Hello;3. Base b = new Sub (); b.Hello;4. Sub s = new Base(); s.Hello;
考题
向页面输出Hello World的JavaScript语句是( )。 A.printf(Hello WorldHello World的JavaScript语句是( )。A.printf(Hello World) B.document.write(Hello World)C.h4Hello World/h4 D.alert(Hello World)
考题
下面输出与其他不一致的是?()A、valw="World";println(s"Hello$w")B、valw="World";println("Hello$w")C、println("HelloWorld")D、valw="World";println("Hello"+w)
考题
下列选项中,()是正确的表达式。 A、% String s = “hello world ” ;% B、% = “hello world ” ;% C、% = “hello world ” % D、% ! “hello world ” %
考题
执行代码Strings=newString("Hello")后,正确的结论是()A、s最后一个索引值为5B、s的值和"Hello"并不一样C、s.length为4D、s.length为5
考题
有语句String s=”hello world”; ,以下操作哪个是不合法的()A、int i=s.length();B、s=3;C、String ts=s.trim();D、String t=s+”!”
考题
public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?() A、The program runs and prints “Hello”B、An error causes compilation to fail.C、The program runs and prints “Hello world!”D、The program runs but aborts with an exception.
考题
单选题有语句String s=”hello world”; ,以下操作哪个是不合法的()A
int i=s.length();B
s=3;C
String ts=s.trim();D
String t=s+”!”
考题
单选题public class X { public static void main (String[]args) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()A
The program runs and prints “Hello”B
An error causes compilation to fail.C
The program runs and prints “Hello world!”D
The program runs but aborts with an exception.
考题
单选题下列选项中,()是正确的表达式。A
% String s = “hello world ” ;% B
% = “hello world ” ;% C
% = “hello world ” % D
% ! “hello world ” %
热门标签
最新试卷