Question: What is the difference between a destructor and a copy constructor? A destructor is called when an object is destroyed, while a copy constructor is
What is the difference between a destructor and a copy constructor?
A destructor is called when an object is destroyed, while a copy constructor is called when an object is copied.
None of the above
A destructor is called when an object is copied, while a copy constructor is called when an object is created.
A destructor is called when an object is created, while a copy constructor is called when an object is destroyed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
