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: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
[单选题]下面程序的运行结果为 include class A {int num; public: A(int) {num=i;} A(A &a下面程序的运行结果为#include<iostream.h>class A{int num;public:A.(int) {num=i;}A.(A & a) {hum=a. num++;}void print( ) {cout < < num;}};void main( ){A. a(1) ,b(a) ;a. print( ) ;b. print( ) ;
[单选题]下面程序的运行结果为includeclass A{ int num;public: A(int){num=i;} A(ABm){num下面程序的运行结果为 #include<iostream.h> class A { int num; public: A(int){num=i;} A(ABm){num=a.num++;} void print(){cout<<num;} }; void main() { Aa(1),b(a); a.print(); b.print(); }A.11B.12C.2
[单选题]下面程序的运行结果为 include class A { public: A( ) {cout < <"1";} ~A( ) {co下面程序的运行结果为#include<iostream. h>class A{public:A.( ) {cout < <"1";}~A( ) {cout < <"2";}};class B:public A{public:B.( ) {cout < <"3";}~B( ) {cout < <"4";}};void main( ){B. b;}A
[单选题]下面程序段的输出结果为 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; 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
[单选题]下面程序的运行结果是( )。 public class Test { public static void main (String args[]) { int c=5; System. out. println (C); System. out. println (c++); System. out. println (C); } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6
[单选题]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
[单选题]下面程序的运行结果是includevoid main( 0{ int num =1; int &ref = num; ref=下面程序的运行结果是 #include<iostream.h> void main( 0 { int num =1; int &ref = num; ref=ref+2; cout << num; num = num+3; cout < < ref < < end1; }A.13B.16C.36D.33
[单选题]下面程序的运行结果是includevoid main(){int num=1;int &ref=num;ref=ref£«2;c下面程序的运行结果是 #include<iostream.h> void main() { int num=1; int &ref=num; ref=ref+2; cout<<num; num=num+3; cout<<ref<<end1; }A.13B.16C.36D.33