
给出以下代码,该程序的运行结果是()class Example {public static void main (String args[])
A.-1
B.Exception
C.1
D.0

A.-1
B.Exception
C.1
D.0
第1题
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringQ
args){Console.WriteLine("/Looklikeacomment");}}
A.LookslikeA.comment
B./LookslikeA.comment
C.没有输出任何内容
D.编译错误
第2题
;Console.WriteLine("s="+s);}}
A.无内容输出
B.代码编译失败
C.打印输出null
D.打印输出s=null
第3题
分析下面的C#代码,该程序的运行结果是()。classExample{staticstrings1;staticstring
s2;staticvoidMain(stringDargs){s2=s1+s2;Console.WriteLine(s2);}}
A.代码编译失败
B.运行时错误,抛出NullPointerException异常
C.打印输出nullnull
D.代码编译成功,打印输出内容为空白行
第4题
分析下面的Java代码,该程序的运行结果是()
class Example{
public static void main(String args[]){
int var=10;
int var2=20;
System.out.println(var+var2+" "+var2);
}
}
A、 打印输出30 20
B、 打印输出1020 20
C、 打印输出50
D、 打印输出2010 20
第5题
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringO
args){(newExample).myMethod(;}voidmyMethod(){intxy;x=5;y=3;Console.Write("(*+x+","+y+'));switchCoords(x.y);Console.Write("("+x+"+y+")");}voidswitchCoords(intX,inty){inttemp;temp=x;y=temp;Console.Write("+x+"+y+")");}}
A.打印输出(5,3)(5,5)(5,3)
B.打印输出(5,3)(3,5)(3,5)
C.打印输出(5,3)(3,5)(5,3)
第6题
A. 17
B. 16
C. 13
D. 14
第7题
A.WriteLine(a[3]);}}
B.1
C.2
D.3
E.4
第8题
A.WriteLine(baz);}}
B.打印输出0
C.打印输出1
D.打印输出2
E.编译错误
第9题
A. 打印输出0
B. 打印输出1
C. 打印输出2
D. 打印输出3