Advertisements
Advertisements
Questions
Write any four characteristics of destructor function.
State any four characteristics of Destructor.
Short Answer
Advertisements
Solution
- The name of a destructor is identical to the class name, but it is written with a tilde (~) symbol before it.
Example:~fib(){.... message ....} - A destructor is declared without any return type because it does not return a value.
- A destructor does not accept any parameters.
- It is usually declared with public access in the class definition.
shaalaa.com
Is there an error in this question or solution?
2024-2025 (March) Official
