Question 84Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

Which of the following constructors is provided by the C++ compiler if not defined in a class?

  1. ACopy constructor
  2. BDefault constructor
  3. CParameterized constructor
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (B) Default constructor

Explanation

If a class defines no constructor at all, the compiler supplies a default constructor.

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 84 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. 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.