Derived Classes, Templates & Exception Handling in C++ Quiz 3
1 / 63
What are the operators available in C++ for dynamic allocation and de-allocation of memories?
2 / 63
1. Which keyword is used to throw an exception?
3 / 63
Which operations don?t throw anything?
4 / 63
Which function is invoked when we try to throw an exception that is not supported by a function?
5 / 63
How one can restrict a function to throw particular exceptions only?
6 / 63
Exception handlers are declared with ____________ keyword.
7 / 63
What happens if try catch block is not used?
8 / 63
What id the syntax for catching any type of exceptions?
9 / 63
Which function is invoked when an unhandled exception is thrown?
10 / 63
What can go wrong in resource management on c++?
11 / 63
What are the different types of exceptions?
12 / 63
Which handler is used to handle all types of exception?
13 / 63
Why do we need to handle exceptions?
14 / 63
What is an error in C++?
15 / 63
Which is used to solve the memory management problem in c++?
16 / 63
When do we call that resource is leaked?
17 / 63
Return type of uncaught_exception() is________________
18 / 63
What is meant by garbage collection?
19 / 63
Why is it expensive to use objects for the exception?
20 / 63
What will happen if an exception that is thrown may cause a whole load of objects to go out of scope?
21 / 63
What will happen when an exception is not processed?
22 / 63
What function will be called when we have an uncaught exception?
23 / 63
What will happen when a programs throws any other type of exception other than specified?
24 / 63
What kind of error can arise when there is a problem with memory?
25 / 63
Header file used for exception handling in C++?
26 / 63
What is the main purpose of the constructor?
27 / 63
Where should we place catch block of the derived class in a try-catch block?
28 / 63
By default, what a program does when it detects an exception?
29 / 63
What is an exception in C++ program?
30 / 63
Uncaught exception leads to ______________
31 / 63
What operation can be performed by destructor?
32 / 63
Which header file is used to declare the standard exception?
33 / 63
Which of the following is best to include under try block?
34 / 63
Which statement is used to catch all types of exceptions?
35 / 63
In nested try catch blocks, if both inner and outer catch blocks are unable to handle the exception thrown, then ______________
36 / 63
What is meant by exception specification?
37 / 63
Which type of program is recommended to include in try block?
38 / 63
How Exception handling is implemented in the C++ program?
39 / 63
What is the use of RAII in c++ programming?
40 / 63
What will not be called when the terminate() is raised in the constructor?
41 / 63
Where are standard exception classes grouped?
42 / 63
What are the disadvantages if use return keyword to return error codes?
43 / 63
Which alternative can replace the throw statement?
44 / 63
What do you mean by ?No exception specification??
45 / 63
Pick out the correct statement for error handling alternatives.
46 / 63
What will happen when we move to try block far away from catch block?
47 / 63
Which part of the try-catch block is always fully executed?
48 / 63
What are the predefined exceptions in c++?
49 / 63
The C++ code which causes abnormal termination/behaviour of a program should be written under _________ block.
50 / 63
How many types of standard exception are there in c++?
51 / 63
What is Re-throwing an exception means in C++?
52 / 63
In nested try-catch block, if the inner catch block gets executed, then______________
53 / 63
How to handle error in the destructor?
54 / 63
What kind of exceptions are available in c++?
55 / 63
Identify the correct statement about throw(type).
56 / 63
If inner catch block is unable to handle the exception thrown then__________
57 / 63
How many levels are there in exception safety?
58 / 63
Which is used to handle the exceptions in c++?
59 / 63
Which of the following is an exception in C++?
60 / 63
What is most suitable for returning the logical errors in the program?
61 / 63
What is the difference between error and exception?
62 / 63
Which operator is used as catch-all handler?
63 / 63
An uncaught handler returns to _______________
Provide Your Information
Your score is
The average score is 0%
Restart quiz