In C++, what is a constructor, destructor?

Submitted by: Administrator
In C++

Constructor:This is a member of class which involkes when the object is created.Purpose of constructor is to intialise the objects with required values.

Destructor: It is a member of class which involkes when the object is out of scope.The purpose of destructor is to clear the heap memory.
Submitted by: Administrator

Read Online Hardware and Software Design Job Interview Questions And Answers