In which case it is mandatory to provide a destructor in a class?
Show answerHide answer
Correct answer: (D) Class whose objects will be created dynamically.
Explanation
A class whose objects are created dynamically, or that allocates memory with new, needs a destructor to free that memory. Otherwise the memory leaks.