[单选题]

若给下面的方法传入参数67时,输出结果为( )。 public int MaskOff(int N) { return N^3; }

A.3

B.64

C.67

D.0

参考答案与解析:

相关试题

下面程序段的输出结果为public class Test{int a,b;Tes

[单选题]下面程序段的输出结果为 public class Test { int a,b; Test() { a=100; b=200; } Test(int x,int y) { a=x; b=y; } public static void main(String args[]) { Test bjl=new Test(12,45); System.out.println("a="+objl.a+" b="+Objl.B); Test Obj2=new Test(); System.out.pr

  • 查看答案
  • 下面程序段的输出结果为public class Test{int a, b;Te

    [单选题]下面程序段的输出结果为 public class Test { int a, b; Test() { a=100; b=200; } Test(int x,int y) { a=x; b=y; } public static void main(String args[]) { Test Obj1=new Test(12,45); System.out.println("a=+Obj1.a+" b="+Obj1.B) ; Test Obj2=new Test(); System.out.p

  • 查看答案
  • 3下面程序段的输出结果为()。public class Test{int a,

    [单选题]3下面程序段的输出结果为( )。public class Test{ int a, b; Test() { a=100; b=200; } Test(int x, int y) { a=x; b=y; } public static void main(String args[]) { Test Obj 1 = new Test(12,45 ); System.out.println("a="+Obja+" b="+Objb); Test Obj2 = new Test(); Syste

  • 查看答案
  • 执行下面的程序段,输出结果为______。public class Q{publ

    [主观题]执行下面的程序段,输出结果为______。public class Q{public static void main(String argvr)){int anar[]=new int[5];System.out.println(anar[0]);}}

  • 查看答案
  • 下面程序的输出结果为( )。public class Test {public

    [单选题]下面程序的输出结果为( )。 public class Test { public static void main (String args[]) { String X="ABCD"; String Y="EFG"; X=X.substring (X.length()-Y.length()); System.out.println(X); } }A.ABCB.BCDC.EFGD.ABCDEFG

  • 查看答案
  • 下面程序的运行结果为( )。 class A } public: int num

    [试题]下面程序的运行结果为[ ]。class A} public:int num;A.(int i){num=i;}A.(A &a){num=++a.num;}void print(){cout<<num;}};void main(){A. a(1),b(a);a.print();b.print();}

  • 查看答案
  • 下面程序的运行结果为#includeclass A{int num;public

    [单选题]下面程序的运行结果为includeclass A{int num;public:A(int i){num=i;}A(A &a)下面程序的运行结果为 #include<iostream.h> class A { int num; public: A(int i){num=i;} A(A &a) { num = a.num+ +;} void print( ) {cout << num;} }; void main( 0 { A a (1),b (a) ; a.print( ); b

  • 查看答案
  • 下面程序段的输出结果为public class Test{public stat

    [单选题]下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println("a="+a+"b="+B); c=(b==false); System.out.println("b="+b+"c="+C); } }A.a=true b=false b=true c=falseB.a=true b=fal

  • 查看答案
  • 下面程序执行后的输出结果为()。public class fun{public

    [单选题]下面程序执行后的输出结果为( )。 public class fun { public static void main(String args[]) { String greets = " How are you!"; String s = greets.substring(0,3); System.out.println(s); } }A.HowB.areC.youD.how are you!

  • 查看答案
  • 下面程序段的输出结果为public class Test{public stat

    [单选题]下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println(”a=”+a+”b=+b) ; c=(b==false); System.out.printhln(”b=”+b+”c=”+c) ; } }A.a=true b=false b=true c=falseB.a=true b=false

  • 查看答案