Advertisements
Advertisements
Question
What is not true for a constructor?
Options
It is used only to initialize the data members.
It returns a unique value.
It may not use parameter.
None of the above.
MCQ
Solution
It returns a unique value.
Explanation:
A constructor does not return any value, even void. It simply initializes the object and returns nothing.
shaalaa.com
Is there an error in this question or solution?