若有如下程序:include<iostream>using namespace std;class TestClass{public:void who() {cout

若有如下程序: include<iostream> using namespace std; class TestClass { public: void who() {cout<<"TestClass"<<endl;} }; class TestClass1:public TestClass { public: void who(){cout<<"TestClass1"<<endl;} }; int main() { TestClass *p; TcstClass1 obj1; p=&obj1; p->who(); return 0; } 则该程序运行后的输出结果是()。 A.TestClass1 B.TestClass C.0 D.无输出

时间:2023-10-05 14:54:10

相似题目