📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    Which of the following is correct about C++

    constructors?
    A Can have a return type Correct Answer Incorrect Answer
    B Has the same name as the class Correct Answer Incorrect Answer
    C Must be called explicitly Correct Answer Incorrect Answer
    D Cannot be overloaded Correct Answer Incorrect Answer
    E Only one constructor is allowed per class Correct Answer Incorrect Answer

    Solution

    Constructors share the class name, have no return type, and can be overloaded.

    Practice Next
    ask-question