Multiple choice

For class person, destructor would be

  1. `Person

  2. ~Person

  3. :Person

  4. None of the above

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

In C++, the destructor is named by prefixing a tilde (~) to the class name. For a class named Person, the destructor would be ~Person(), which is automatically called when the object is destroyed.