Is the destruction of temporary object safe (while returning object)?
(a) Yes, the resources get free to use
(b) Yes, other objects can use the memory space
(c) No, unexpected side effects may occur
(d) No, always gives rise to exceptions
This question was posed to me in an interview for job.
Question is from Passing and Returning Object with Functions in section Object of Object Oriented Programming