1.

What should be the name of the constructor?(a) same as the object(b) same as the member(c) same as the class(d) same as the functionI have been asked this question in an interview.I need to ask this question from Class Hierarchies and Abstract Classes in portion Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

The CORRECT ANSWER is (C) same as the class

For explanation: CONSTRUCTOR name should be same as the class name.



Discussion

No Comment Found

Related InterviewSolutions