Copy Constructor Quiz-Asked in Interviews.

Solution: D is correct

In C++, a Copy Constructor may be called for the following cases:1) When an object of the class is returned by value. 
2) When an object of the class is passed (to a function) by value as an argument.
3) When an object is constructed based on another object of the same class.
4) When the compiler generates a temporary object.

Thanks for Reading

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Placewit

Placewit

Upskilling students for tech placements!