Q: 13
What happens when you attempt to compile and run the following code?
#include
using namespace std;
class A
{
public:
virtual void Print(){ cout<<"A";}
};
class B:public A
{
public:
virtual void Print(){ cout<Print();
B ob2;
obj = &ob2;
obj?>Print();
}
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.