Constructor function is not called when an object is passed to a function, will its destructor be called when its copy is destroyed?
(a) Yes, depending on code
(b) Yes, must be called
(c) No, since no constructor was called
(d) No, since same object gets used
The question was posed to me in an international level competition.
I would like to ask this question from Passing and Returning Object with Functions topic in portion Object of Object Oriented Programming