CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science inheritane Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE INHERITANCE DELHI 2004: 2.c) Given the following definitions answer the following:
(i) Name the members, which can be accessed
from the member functions of class human. Ans:
(ii) Name the members, which can be accessed by an object of class human. Ans: Data Members - No data members can be accessed.
(iii) What will be the size of an object of the (in bytes) of class human? Ans: 78 Bytes. DELHI 2003: 2.c) Consider the following and answer the questions given below.
Ans: i) Which class constructor can be called first at the time of declaration of an object of class Outlet? Ans: MNC class constructor can be called first at the time of declaration of an object of class Outlet.(When an object of the derived class is declared, in order to create it, firstly the constructor of the base class is invoked an then, the constructor of the derived class is invoked. On the other hand, when an object of the derived class is destroyed, first the destructor of the derived class is invoked followed by the destructor of the base class). ii) How many bytes does an object belonging to class Outlet require? Ans: 133 Bytes iii) Name the member function(s) which are accessed from the object(s) of class Outlet. Ans:
iv) Name the data member(s), which are accessible from the object(s) of class Branch. Ans: MNC::Country
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|