更多“【单选题】4.4 阅读下面的程序,写出运行结果 class Samp {Samp(int i){System.out.println(i); }} public class Test{ public …”相关的问题
第1题
阅读下面的程序,写出程序的运行结果_______ #include<stdio.h> int main() { int i,j; i=010; j=9; printf("%d,%d",i-j,i+j); }
点击查看答案
第2题
请阅读下面的程序片段 int x = 3; if (x > 5) { System.out.print("a"); } else { System.out.print("b"); } 选择程序的运行结果()
点击查看答案
第3题
阅读下面的程序,int a=10,b=4,c=20,d=6; label1.Text=a++*b+c*--d; 程序的运行结果为:
点击查看答案
第4题
阅读下面的程序, int x=3,y=4,z=5; String s=”xyz” label1.Text=s+x+y+z; 程序的运行结果为
A.xyz12
B.xyz345
C.xyzxyz
D.12xyz
点击查看答案
第5题
1、请阅读下面的程序,选择正确的运行结果。() class Demo{ private static int x ; public static void main(String[] args){ System.out.println(x++); } }
点击查看答案
第6题
【单选题】下面的程序段执行结果是()。 public class None { public static void main(String[] args) { try{ return; }finally { System.out.println("finally"); } } }
A.编译通过,但运行时出现异常
B.程序正常运行,不输出任何结果
C.程序正常运行,并输出“finally”
D.因为没有catch语句,编译错误
点击查看答案
第7题
【简答题】分析下面的程序,写出程序的运行结果。 #include <stdio.h> int main() { char c1='a',c2='b',c3='c',c4='110',c5; c5=c4+1; printf("a%c b%c c%ctabcn",c1,c2,c3); printf("%c %cn",c4,c5); return 0; }
点击查看答案
第8题
【单选题】请先阅读下面的代码 int x = 1; int y = 2; if (x % 2 == 0) { y++; } else { y--; } Console.WriteLine("y=" + y); 上面一段程序运行结束时,变量y的值为下列哪一项?
点击查看答案
第9题
【其它】程序分析: 阅读下面的程序,分析代码是否能够编译通过,如果能编译通过,请列出运行的结果。否则请说明编译失败的原因。 public class Test { public static void main(String args[]) { int n = 9; while (n > 6) { System.out.println(n); n--; } } }
点击查看答案