Which statement about constructors in C++ is TRUE?
Show answerHide answer
Correct answer: (D) They have the same name as the class and no return type
Explanation
Constructors share the class name, have no return type and run automatically.
Correct answer: (D) They have the same name as the class and no return type
Explanation
Constructors share the class name, have no return type and run automatically.
This is question 139 of DSSSB TGT Computer Science Full Mock Test 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.