Page 176 - C++
P. 176
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 an 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.
Ans. (i) MNC
(ii) 129 Bytes
(iii) MNC::enterdata(),MNC::displaydata(),branch::add(),branch::show(),outlet::enter(), outlet::output()
(iv) MNC::country
OR
(d) Consider the following class employee : (4)
class employee
{
char empno[5],empname[20];
float salary;
protected :
float Remuneration;
void AssignRem(float);