A class in C++ can have the following

2026

A class in C++ can have the following

Answer: C. Multiple CONSTRUCTORS and one DESTRUCTORIn C++, a class can have multiple constructors via constructor overloading, but only one destructor. A complete solution is required to explain these class…

  1. A.

    One CONSTRUCTOR and one DESTRUCTOR

  2. B.

    One CONSTRUCTOR and multiple DESTRUCTORS

  3. C.

    Multiple CONSTRUCTORS and one DESTRUCTOR

  4. D.

    Multiple CONSTRUCTORS and multiple DESTRUCTORS

Attempted by 191 students.

Show answer & explanation

Correct answer: C

In C++, a class can have multiple constructors via constructor overloading, but only one destructor. A complete solution is required to explain these class members.

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…