Multiple choice

What is the main purpose of using default constructor in a C++ program?

  1. It is compulsorily required in every program.

  2. It is used to access data members of a class.

  3. It is used to initialise the object of a class.

  4. It is used to avoid any confusion when overloaded constructors are used.

  5. It is of no use.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct option as default constructor is used to initialise the object of a class.