Chapter 16: Problem 8
Consider the following C++ code: int lowerLimit; . . . try { cout << "Entering the try block." << endl; if (lowerLimit < 100) throw exception("Lower limit violation."); cout << "Exiting the try block." << endl; } catch (exception eObj) { cout << "Exception: " << eObj.what() << endl; } cout << "After the catch block" << endl; What is the output if: a. The value of lowerLimit is 50? b. The value of lowerLimit is 150?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.