Multiple choice

Which of the following types of constructor function should be used to initialise the various data elements of different objects with different values when they are created?

  1. Default constructor

  2. Parameterized constructor

  3. Copy constructor

  4. Overloaded constructor

  5. Constructor with default value

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

This type of constructor function should be used to initialise the various data elements of different objects with different values when they are created.