Exception Handling
- Pick out the correct statement for error handling alternatives.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
When an error is raised means, it will be pushed into stack and it can be corrected later by the programmer.
- What will happen when an exception is not processed?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
As in the case of not using an exception, it will remain useless in the program and increase the code complexity.
- Which header file is used to declare the standard exception?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
#include
- Where are standard exception classes grouped?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
As these are standard exceptions, they need to be defined in the standard block, So it is defined under namespace std.
- How many types of standard exception are there in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
There are nine standard exceptions in c++. They are bad_alloc, bad_cast, bad_exception, bad_function_call, bad_typeid, bad_weak_ptr, ios_base::failure, logic_error and runtime_error.