Exam 16: Exception Handling
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
If some part of your program or any library functions that are called) throw an exception, then if this exception is not handled in your code, your program will _____.
Free
(Short Answer)
4.7/5
(35)
Correct Answer:
exit
It is legal to have a catch block with no parameter.
Free
(True/False)
4.8/5
(30)
Correct Answer:
True
If a function throws an exception, it must be caught inside that function.
Free
(True/False)
4.9/5
(43)
Correct Answer:
False
Which type of exception is thrown if a call to the new operator fails?
(Multiple Choice)
4.8/5
(39)
Which of the following function declaration correctly specifies that two types of exceptions are thrown?
(Multiple Choice)
4.8/5
(40)
The following function does not throw any unhandled exceptions
void f1 ) throw );
(True/False)
4.9/5
(38)
Which of the following is not a valid reason for using exception handling?
(Multiple Choice)
4.9/5
(36)
The following catch block catches all __________ exceptions.
catch string e)
{
}
(Short Answer)
4.9/5
(38)
If class A is derived from class B, and a virtual function in class B throws an exception, then the overridden version of that function in class A must
(Multiple Choice)
4.8/5
(39)
If the following function throws an unhandled exception, what happens?
void f1);
(Essay)
4.9/5
(38)
A throw statement passes which type of value to the catch block?
(Short Answer)
4.9/5
(36)
If the following function will throw a string exception, then
Void myFunction );
(Multiple Choice)
4.8/5
(32)
If you have a function that might throw an exception and some programs that use that function might want to handle that exception differently, you should
(Multiple Choice)
4.9/5
(27)
When an unusual situation or error occurs, then the ________ statement is executed.
(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)