InterviewSolution
Saved Bookmarks
| 1. |
Which is the correct statement for default constructors?(a) The constructors with all the default arguments(b) The constructors with all the null and zero values(c) The constructors which can’t be defined by programmer(d) The constructors with zero argumentsThis question was addressed to me in semester exam.The origin of the question is Constructors Overloading in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» RIGHT option is (d) The constructors with zero ARGUMENTS The EXPLANATION is: The closest answer to the QUESTION is that a default constructor is a constructor with zero arguments. But this is not the actual case. Actually the constructors provided by the compiler are default constructors. And the constructors with zero arguments defined by the programmer are zero ARGUMENT constructors. |
|