Question: P 9 . Consider the following inheritance: class One { public: void whoami ( ) { cout < < One ; } } ; class
P Consider the following inheritance:
class One
public:
void whoamicoutOne ;
;
class Two: public One
public:
void whoamicoutTwo ;
;
class Three: public Two
public:
void whoamicoutThree;
;
int main
One dog;
Two cat;
Three rat;
One objPtr;
objPtr&dog;
objPtr&cat;
objPtr&rat;
forint i; i; i
objPtriwhoami;
return ;
What is the output?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
