多选题下面哪个语句是正确的()Ashort s=256;BString s=‘Helloworld’;Cint x=012;Dchar c=“a”;
多选题
下面哪个语句是正确的()
A
short s=256;
B
String s=‘Helloworld’;
C
int x=012;
D
char 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
单选题下列选项中,正确的语句组是()。Achar s[8]; s={“Beijing”};Bchar *s; s={“Beijing”};Cchar s[8]; s=“Beijing”;Dchar *s; s=“Beijing”;
单选题下列能够正确进行字符串赋值操作的是()。Achar s[5]={“ABCDE”};Bchar *s; s=“ABCDE”;Cchar s[5]={‘A’,‘B’,‘C’,‘D’,‘E’};Dchar *s; scanf(“%s”,s);
单选题下列给字符数组赋初值时,正确的是()。Achar s1[]=abcdef;Bchar s2[4]=abcd;Cchar s3[2][3]={abc,xyz};Dchar 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”;,下列语句错误的是()。Aint m=s.indexOf(‘r’);Bchar c=s.charAt(0);Cint n=s.length();DString str=s.append(‘2’);
单选题以下选项中正确的语句组是( )。Achar s[]; s=BOOK!;Bchar*s; s={BOOK!};Cchar s[10]; s=BOOK!;Dchar*s; s=BOOK!;
多选题在Java语言中,下列语句能通过编译的是()。AString s = john + was + here;BString s = john + 3;Cint a = 3 + 5;Dint a = 5 + 5.5;
单选题下面哪个是对字符串String的正确定义()。AString s1=null;BString s2=’null’;CString s3=(String)‘abc’;DString s4=(String)‘/uface’;
单选题设Strings="story";下列选项中的语句书写正确的是()。As+=books;Bchar c = s[1];Cint len = s.length;Ds = s-books;