网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下面的哪些程序片段可能导致错误()。
A.Strings=“Gonewiththewind”;Stringt=“good”;Stringk=s+t;
B.Strings=“Gonewiththewind”;Stringt;t=s[3]+“one”;
C.Strings=“Gonewiththewind”;Stringstandard=s.toUpperCase();
D.Strings=“homedirectory”;Stringt=s–“directory”;
参考答案
更多 “ 下面的哪些程序片段可能导致错误()。 A.Strings=“Gonewiththewind”;Stringt=“good”;Stringk=s+t;B.Strings=“Gonewiththewind”;Stringt;t=s[3]+“one”;C.Strings=“Gonewiththewind”;Stringstandard=s.toUpperCase();D.Strings=“homedirectory”;Stringt=s–“directory”; ” 相关考题
考题
下面的哪些程序段可能导致错误? ( ) Ⅰ: String s = "Gone with the wind"; String t = "good "; String k = s + t; Ⅱ: String s = "Gone with the wind"; String t; t = s[3] + "one"; Ⅲ: String s = "Gone with the wind"; String standard = s.toUpperCase(); Ⅳ: String s = "home directory"; String t = s-"directory":A.Ⅱ、ⅢB.Ⅱ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ
考题
设有以下程序片段:char a[ ]="hello",*p;p=a;printf("%d",*(p+5));执行上面的程序片段后的结果为( )
A.111B.0C.104D.不确定的值
考题
下面的哪些程序段可能导致错误? ( ) Ⅰ:String s="Gone with the wind"; String t="good"; String k=s+t; Ⅱ:String s="Gone with the wind"; String t; t=s[3]+"one"; Ⅲ:String s="Gone with the wind"; String standard=s.toUpperCase(); Ⅳ:String s="home directory"; String t=s-"directory";A.Ⅱ、ⅢB.Ⅱ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ
考题
请阅读下面的程序片段 int x = 3; if (x > 5) { System.out.print("a"); } else { System.out.print("b"); } 选择程序的运行结果()A.aB.bC.abD.编译错误
考题
【单选题】下面的哪些程序片段可能导致错误A.String s = “Hello” ; String t = “World” ; String k = s+t ;B.String s = “hello” ; String t ; t = s[3]+”one” ;C.String s = “Hello” ;D.String s = “Hello world!” ;
热门标签
最新试卷