InterviewSolution
Saved Bookmarks
| 1. |
Default constructor must be defined, if parameterized constructor is defined and the object is to be created without arguments.(a) True(b) FalseI got this question during an online exam.This interesting question is from Constructors in section Constructors and Destructors of Object Oriented Programming |
|
Answer» RIGHT answer is (a) True To explain I would say: If the object is create without arguments and only parameterized CONSTRUCTORS are used, COMPILER will give an error as there is no DEFAULT constructor defined. And some constructor must be called so as to create an object in MEMORY. |
|