Computer Science, asked by 007Shantanu, 1 year ago

Can any one tell me the difference between constructor and destructor in C++

Answers

Answered by sona561
0
Constructor is used to initialize the instance of a class. Destructor destroys the objects when they are no longer needed. Constructor is Called when new instance of a class is created. Destructor is called when instance of a class is deleted or released.
Answered by karpahalakshmi
0
Constructor is used to initialize the instance of a class. Destructor destroys the objects when they are no longer needed. Constructor is Called when new instance of a class is created. Destructor is called when instance of a class is deleted or released.
I hope this helps you.
Similar questions