What will be printed out as a result of the following code execution?
#include <iostream>
using namespace std;
class C
{
public:
void Print() { cout << "CLASS C"; }
};
class D : public C
{
public:
void Print() { cout << "CLASS D"; }
};
int main()
{
C *test = new D();
test->Print();
}
Login in to like
Login in to comment