Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

other than the incorrect freeing of dynamically allocated memory, think of a situation in which it would be improper to return an object from a...

other than the incorrect freeing of dynamically allocated memory, think of a situation in which it would be improper to return an object from a function.

Answers


Davis
There are several situations in which it would be improper to return an object.If an object opens a disk file when it is created and closes that file when it is destroyed, if that object is returned from a function, the file will be closed when the temporary object is destroyed.

Githiari answered the question on May 12, 2018 at 17:53

Answer Attachments

Exams With Marking Schemes

Related Questions