网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
多选题
下面哪个语句是正确的()
A
short s=256;
B
String s=‘Helloworld’;
C
int x=012;
D
char c=“a”;
参考答案
参考解析
解析:
暂无解析
更多 “多选题下面哪个语句是正确的()Ashort s=256;BString s=‘Helloworld’;Cint x=012;Dchar c=“a”;” 相关考题
考题
String s=”Example String”; 下面哪些语句是正确的?()
A.s>>>=3;B.int i=s.length();C.s[3]=”x”;D.String short_s=s.trim();E.String t=”root”+s;
考题
下面各语句中,能正确进行赋字符串操作的语句是A.char s[5]= { "ABCDE" };B.char s[5]= { 'A' ,' B' ,' C' ,' D' ,' E' };C.char *s; s = "ABCBE";D.char *s; scanf("%s", s);
考题
下列给字符数组赋初值时,正确的是()。Achar s1[]="abcdef";Bchar s2[4]="abcd";Cchar s3[2][3]={"abc","xyz"};Dchar s4[4][]={’a’,’x’,’s’,’t’};
考题
若已有以下定义和语句: #include int x=4,y=3,*p,*q,*s; p=x; q=y; s=q; q=NULL; 则下面分别给出的四条语句中,错误的是()A、*q=0;B、s=p;C、*p=x;D、*p=*s;
考题
设原字符串s为StringBuffer型,且s="Hellojava",如果想用子串替换把s转换成"HelloWorld",则正确的语句是()A、s.replace(6,9,"World");B、s.replace(6,10,"World");C、s="World";D、s=replace("java","World");
考题
下面正确的逻辑IF语句是哪一条()?A、IF(NX.BQ.NY)THENGOTO10B、B.IFLT.BPRANT*C、IF(ABS(x).LE.1E-5)x=5D、IF(S.AND.(S.LE.2.0))S=2*3
考题
单选题下列选项中,正确的语句组是()。A
char s[8]; s={“Beijing”};B
char *s; s={“Beijing”};C
char s[8]; s=“Beijing”;D
char *s; s=“Beijing”;
考题
单选题下列能够正确进行字符串赋值操作的是()。A
char s[5]={“ABCDE”};B
char *s; s=“ABCDE”;C
char s[5]={‘A’,‘B’,‘C’,‘D’,‘E’};D
char *s; scanf(“%s”,s);
考题
单选题下列给字符数组赋初值时,正确的是()。A
char s1[]=abcdef;B
char s2[4]=abcd;C
char s3[2][3]={abc,xyz};D
char s4[4][]={’a’,’x’,’s’,’t’};
考题
多选题下面的哪些程序片段可能导致错误()。AString s = “Gone with the wind”; String t = “ good”; String k = s + t;BString s = “Gone with the wind”; String t; t = s[3] + “one”;CString s = “Gone with the wind”; String standard = s.toUpperCase();DString s = “home directory”; String t = s – “directory”;
考题
多选题下面哪段语法执行正确()AString s = Gone with the wind;String t = good ;String k = s + t;BString s = Gone with the wind;String t; t = s[3] + one;CString s = Gone with the wind;String standard = s.toUpperCase();DString s = home directory;String t = s - directory;
考题
单选题设有定义:String s=“World”;,下列语句错误的是()。A
int m=s.indexOf(‘r’);B
char c=s.charAt(0);C
int n=s.length();D
String str=s.append(‘2’);
考题
单选题有语句Strings=”helloworld”;,以下操作哪个是不合法的?()A
inti=s.length()B
s=3C
Stringts=s.trim()D
Stringt=s+”!”
考题
多选题已知Strings=“Java”,则下面哪些代码是正确的()As=s+1;Bchar c=s[3];Cint i=s.length;DString t=s+new Object();
考题
单选题以下选项中正确的语句组是( )。A
char s[]; s=BOOK!;B
char*s; s={BOOK!};C
char s[10]; s=BOOK!;D
char*s; s=BOOK!;
考题
多选题在Java语言中,下列语句能通过编译的是()。AString s = john + was + here;BString s = john + 3;Cint a = 3 + 5;Dint a = 5 + 5.5;
考题
单选题下面哪个是对字符串String的正确定义()。A
String s1=null;B
String s2=’null’;C
String s3=(String)‘abc’;D
String s4=(String)‘/uface’;
考题
单选题设Strings="story";下列选项中的语句书写正确的是()。A
s+=books;B
char c = s[1];C
int len = s.length;D
s = s-books;
热门标签
最新试卷