Assuming that all the necessary standard headers have been ....

Q

class Parent {
public:
Parent () { Status () ; }
virtual ~Parent () { Status () ; }
virtual void Status () { cout << "Parent "; }
} ;
class Child : public Parent {
public:
Child () { Status () ; }
virtual ~Child () { Status () ; }
virtual void Status () { cout << "Child " ; }
} ;
int main () {
Child c ;
return 0 ;
}

Assuming that all the necessary standard headers have been
included and the necessary using-directives have been made,
what will be the output of the sample code above?

1 Child Child Child Child
2 Parent Parent
3 Child Child
4 Parent Child Child Parent
5 Child Parent Parent Child

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-05-03, 2993👍, 0💬