Question: Answer the questions related to the following code: class X { public: void x1(); protected: void x2(); }; class Y: public X { void y1();
Answer the questions related to the following code:
class X
{
public:
void x1();
protected:
void x2();
};
class Y: public X
{
void y1();
protected:
void y2();
};
class Z : public Y
{
Public:
void z1();
};
main ()
{
X temp1; Y temp2; Z temp3;
}
- Name all member functions of all classes visible through temp1 in the main function.
- Name all member functions of all classes visible through temp2 in the main function.
- Name all member functions of all classes visible through temp3 in the main function.
Step by Step Solution
3.52 Rating (152 Votes )
There are 3 Steps involved in it
a Name all member functions of all classes visible through temp1 in the main function 1 function x1 ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
635f295fa6e79_231289.pdf
180 KBs PDF File
635f295fa6e79_231289.docx
120 KBs Word File
