Home | | Computer Science 11th std | Characteristics of Destructors

Chapter: 11th Computer Science : Chapter 14 : Classes and objects

Characteristics of Destructors

The destructor has the same name as that of the class prefixed by the tilde character ‘~’.

Characteristics of Destructors

 

• The destructor has the same name as that of the class prefixed by the tilde character ‘~’.

 

• The destructor cannot have arguments

 

• It has no return type

 

• Destructors cannot be overloaded i.e., there can be only one destructor in a class

 

• In the absence of user defined destructor, it is generated by the compiler

 

• The destructor is executed automatically when the control reaches the end of class scope to destroy the object

 

• They cannot be inherited

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Science : Chapter 14 : Classes and objects : Characteristics of Destructors |

Related Topics

11th Computer Science : Chapter 14 : Classes and objects


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.