Multiple choice

Which of the following is not a characteristic of destructor function used in C++?

  1. Destructor must have the same name as the class preceded by a tilde (~).

  2. Destructor has a return type.

  3. Destructor cannot take arguments; so it cannot be overloaded.

  4. There can be only one destructor in each class.

  5. Destructor cannot be inherited.

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

This is not the correct characteristic of the destructor function as it cannot return any value.