Constructors serve to automatically initialized variables data members at the point of creation. Destructors are complimentary to constructors. They serve to de-initialized objects when they are destroyed.
A destructor may be called either when the object goes out of scope or when it is destroyed explicitly using the delete operator. A destructor, like a constructor has the same name as that of the class, but is prefixed by the tilde (‘~’) symbol. A class can’t have more than one destructor. And a destructor can’t take arguments or specify a return value consider the declaration of a word class as given below.