A constructor is called whenever
2023
A constructor is called whenever
- A.
an object is created
- B.
a class is created
- C.
a class is declared
- D.
More than one of the above
- E.
None of the above
Attempted by 152 students.
Show answer & explanation
Correct answer: A
A constructor is a special member function that is invoked when an object is created. It initializes the newly created object, so the correct option is an object is created.