有下列程序: #include<iostream> using namespace std; class TestClass { public: virtual void fun1() { cout<<"fun1TestClass"; } virtual void fun2() { cout<<"fun2TestClass"; } }; class TeSt
A.fun1TeStClass1 fun2TeStClass
B.fun1TestClass1 fun2TestClass1
C.fun1TeStClass fun2TeStClass
D.fun1TestClaSSfun2TestClaSS1
第1题:
有下列程序: #include<iostream> using namespace std; c1ass TestClass { private; char c; public: TestClass(char n):c(n){} ~TeStClass() { cout<<c } }; class TestClass1:public TestClass {
A.xy
B.yx
C.x
D.y
第2题:
有下列程序: #include<iostream> using namespace std; class TestClass{ protected: TestClass(){cout<<'x';} TestClass(char c){cout<<c;} }; class TestClassl:public TestClass{ public: TestClassl(char c){cout<<c;}
A.y
B.yx
C.xy
D.yy
第3题:
第4题:
有如下程序: #include<iostream> using namespace std; Class TestClass {int a; public: TestClass(int x){a=x;} void show(){cout<<a;}}; class TestClass1:public TestClass {int b; public: TestClass1(int i):TestClass(i+1),b(i){} voi
A.5
B.1
C.0
D.2
第5题:
有下列程序: #include<iostream> using namespace std; class TestClass { int a; public: TestClass(int x)<a=x;} void show(){cout<<a;} }; class TestClass1:publicTestClass { int b; public: TestCla
A.5
B.1
C.0
D.2