InterviewSolution
Saved Bookmarks
| 1. |
Size of a class is _____________(a) Sum of the size of all the variables declared inside the class(b) Sum of the size of all the variables along with inherited variables in the class(c) Size of the largest size of variable(d) Classes doesn’t have any sizeI have been asked this question during an online interview.The origin of the question is Classes in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT option is (d) CLASSES doesn’t have any size The explanation is: Classes doesn’t have any size, actually the size of object of the CLASS can be defined. That is done only when an object is created and its constructor is called. |
|