1.

Consider the following and answer the questions give below: class MNC{char Cname[25];  //Compay nameprotected:char Hoffice[25];  //Head officepublic:MNC();char Country[25];void EnterData();void DisplayData();};class Branch:publicMNC {  long NOE //Number of employeeschar Ctry[25];  //Countryprotected:void Association();public:Branch();void Add();void Show();};class Outlet:public Branch{char State[25];public: Outlet();void Enter();void Output();};(i) Which class' constructor will be called first at the time of declaration of an object of class Outlet?(ii) How many bytes does a object belonging to class Outlet require?(iii) Name the member function(s), which are accessed from the object(s) of class Outlet.(iv) Name the data member(s), which are accessible from the object(s) of class Branch.

Answer»

(i) class MNC

(ii) 129 Bytes

(iii)  Enter(), Output(), Add(), Show(), EnterData(), DisplayData()

(iv)  Country[25]



Discussion

No Comment Found

Related InterviewSolutions