Question: Consider the following C + + classes: class a { public: void p 1 ( ) ; virtual void p 2 ( ) ; protected:
Consider the following C classes:
class a
public:
void p;
virtual void p;
protected:
void r;
void r;
private:
void v;
;
class b : public a
public:
void p;
void p;
;
int main
b x new b;
xp;
a xp;
return ;
Does class b inherit the function v
Select
Does class b inherit the functions r and r
Select
In main which version of p is called?
Select
In main which version of p is called?
Select
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
