In which case is it mandatory to provide a destructor in a class?
A. Almost in every class
B. Class for which two or more than two objects will be created
C. Class for which copy constructor is defined
D. Class whose objects will be created dynamically
Answer:D
In which case is it mandatory to provide a destructor in a class?
A. Almost in every class B. Class for which two or more than two objects will be created C. Class for which copy constructor is defined D. Class whose objects will be created dynamically