Exception Handling


  1. Pick out the correct statement for error handling alternatives.











  1. 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.


  1. What will happen when an exception is not processed?











  1. 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.



  1. Which header file is used to declare the standard exception?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    #include


  1. Where are standard exception classes grouped?











  1. 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.



  1. How many types of standard exception are there in c++?











  1. 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.