Question:
Answer the questions (i) to (iv) based on the following:
class Ground
{
int Rooms;
protected:
void Put();
public:
void Get();
};
class Middle : private Ground
{
int Labs;
public:
void Tak();
void Give();
};
class Top : public Middle
{
int Roof;
public:
void In();
void Out();
};
void main()
{
Top T;
}
(i) Which type of Inheritance out of the following is illustrated in the above example ?
Β – Single Level Inheritance, Multilevel Inheritance,Β Multiple Inheritance
(ii) Write the names of all the members, which are directly accessible by the member function Give() of class Middle.
(iii) write the names of all the members, which are directly accessible by the member function Out() of class Top.
(iv) Write the names of all the members, which are directly accessible by the object T of class Top declared in the main() function.
C. Sir| Created: 8-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019
