0 8

BIT153 ยท 0 ยท 5 marks

What is destructor? Discuss its characteristics with suitable example.

What is destructor? Discuss its characteristics with suitable example. [5]

Object Oriented ProgrammingChapter 3: Constructors and DestructorsDestructor definition and characteristics

A destructor is a special member function of a class that is automatically called when an object goes out of scope or is explicitly deleted. It is used to release resources (such as memory, file handles, etc.) that were acquired by the object during its lifetime. --- Characteristic --------------...