Answer the following questions true (T) or false (F)
1. A program can continue to run after an exception has been thrown and caught.
2. A function uses an exception specification that includes only int, but an exception of type double is thrown. A catch block is provided that catches a double, so things proceed properly.
1. True
Explanation: To see that this is true, consider the following scenario. You are saving a document to a floppy disk, but the floppy drive door is not closed. An exception is thrown. A message sent from the catch statement tells you to close the drive door. You do so. The program (continuing) calls the output routine again to save your document.
2. False
Explanation: Exception specifications specify the exceptions that might be thrown. If an exception is thrown that is not in the specification will cause unexpected() to be called. By default, unexpected() calls terminate(), which by default, calls abort() to terminate the program. At least this is what the standard says, but some compilers do not follow the standard in this regard.
You might also like to view...
The ____________________ list contains information that will be merged into the starting document and sent to multiple companies.
Fill in the blank(s) with the appropriate word(s).
Why don't we see red, green, and blue spots at each position in our picture?
What will be an ideal response?
A condition specifies that certain criteria must be met before the macro executes
Indicate whether the statement is true or false
When copying and pasting content between pages, you should use the ____ and quick tag selector bar to make sure the cursor is in the correct div.
A. Folder List panel B. selected text C. store page D. visual aids