C++ Question & Answers
Why is it expensive to use objects for exception?
|A) Exception object is created only if an error actually happens||B) Because of execution time|
|C) Memory space involved in creating an exception object||D) None of the mentioned|
Answer: A) Exception object is created only if an error actually happens
If an error occurs in program, then only exception object is created otherwise, It will not be created. So it’s expensive to use in the program.
- Related Questions