Int
Short
Integer
Long
第1题:
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int i = 1; switch (i) { case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2; System.out.println("two"); default: System.out.println("default"); } } }
A.one
B.one,default
C.one,two,default
D.default
第2题:
表达式的输出结果是( )。
A def
B "def"
C abc
D "abc"
第3题:
顺序执行下列两条语句,输出结果是______。
String s="You are a pretty boy!";System.out.println(s.length( ));
第4题:
下列程序的执行结果是
public class Testee{
public static void main(String args[ ]){
int a=4,b=6,c=8;
String s="abc";
System.out.println(a+b+s+C) ;
}
}
A.ababcc
B.464688
C.46abc8
D.10abc8
第5题:
代码System.out.println(066)的输出结果是( )。
A.12
B.36
C.54
D.66
第6题:
当执行下面的程序时,如果输入ABC,则输出结果是( )。
A.ABC6789
B.ABC67
C.12345ABC6
D.ABC456789
第7题:
下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char *p1="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str);}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
第8题:
( 12 )代码 System.out.println(066) 的输出结果是 【 12 】 。
第9题:
研究下面的Java代码: switch (x) { case 1: System.out.println(1); case 2: case 3: System.out.println(3); case 4: System.out.println(4); } 当x=2时,运行结果是()。
第10题:
if(true){int i=17;} System.out.println(i); 运行此程序的结果是输出17。
第11题:
对
错
第12题:
编译报错
2
1
3
第13题:
代码System.out.println(066)的输出结果是______。动测试,其主要方法有逻辑覆盖、基本路径测试等。
第14题:
以下程序的输出结果是( )。 #include <stdio.h> charcchar(char eh) { if(ch>='A,&&ch<='Z') ch=ch-'A'+'a'; return ch; } main() { char s[]="ABC+abc=defDEF",*p=s; while(*p) { *p=cchsr(*p); p++; } printf("%s\n",s); }
A.abc+ABC=DEFdef
B.abc+abc=defdef
C.abcABCDEFdef
D.abcabcdefdef
第15题:
当执行下面的程序时,如果输入ABC,则输出结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char ss [10] ="12345"; gets(ss);strcat(ss"6789");printf("%s\n",ss); }
A.ABC6789
B.ABC67
C.12345ABC6
D.ABC456789
第16题:
下列代码的执行结果是 ( )public class Test2{public static void main(String args[]){int a=4,b=6,c=8;String s="abc";System.out.println(a+b+s+c);}}
A.ababcc
B.464688
C.46abc8
D.10abc8
第17题:
下列代码的执行结果是( )。 public class Test { public static void main (String args[]) { int a=3,b=5,c=8; String s="abc"; System.out.println(a+b+s+c); } }
A.35abc8
B.8abc8
C.16
D.abc
第18题:
下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s\n",str);}
A.xyzabcAB
B.zabcABC
C.yzabcABC
D.xycbcABC
第19题:
下列代码的执行结果是( )。 public class Test { public static void main(String args[ ]) { int a =4,b=6,c=8; String s ="abc"; System.out.println(a+b+s+c); System.out.println(); } }
A.ababcc
B.464688
C.46abc8
D.10abc8
第20题:
程序System.out.println(10/3);的输出结果是()
第21题:
下面程序的输出结果是() public class Test{ public static void main(String[] args){ String s = “abc dsf ghi”; String[] arr = s.split(“/s”); System.out.println(arr.length); } }
第22题:
没有输出任何结果
输出结果为3
输出结果是3和4
输出结果是1、3和4
第23题: