Question: class A { public: void Print ( ) : protected: string name; } ; private: string address; class B : public A { } B

class A {
public:
void Print():
protected: string name;
};
private: string address;
class B : public A {}
B is the superclass of A
function print available in A and everyone else but not B
variable 'name' only accessible by A and B not anyone else
variable 'address' only accessible by A and B not anyone else
 class A { public: void Print(): protected: string name; }; private:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!