Multiple choice

A constructor's name is same as __________

  1. function name

  2. class name

  3. function name or class name

  4. none of the above

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

A constructor is a special member function that must have the exact same name as the class it belongs to.