ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Constructor function is not called when an object is passed to a function, will its destructor be called when its copy is destroyed?
Correct Answer: D — Yes, must be called
Even though the constructor is not called when the object is passed to a function, the copy of the object is still created, where the values of the members are same. When the object have to be destroyed, the destructor is called to free the memory and resources that the object might have reserved.