Programming - C++ Language
You Are Here :: Home > C++ Language > Exceptions - General Questions
7. |
What will happen when an exception is not processed?
|
A. |
It will eat up lot of memory and program size |
B.
|
Terminate the program |
C.
|
Crash the compiler
|
D.
|
None of the mentioned
|
|
Answer: Option A
Explanation:
As in the case of not using an exception, it will remain useless in the program and increase the code complexity. |
|
8. |
The run time system performs __________ on virtual functions.
|
A. |
additional error checking |
B.
|
dynamic binding |
C.
|
static binding
|
D.
|
no special services
|
|
Answer: Option A
Explanation:
|
9. |
An exception is caused by
|
A. |
A hardware problem |
B.
|
A problem in the operating system |
C.
|
A run-time error
|
D.
|
A syntax error
|
|
Answer: Option C
Explanation:
|
10. |
An exception thrown from outside try block will ______________.
|
A. |
call function return |
B.
|
be ignored |
C.
|
hang the machine
|
D.
|
call function terminate
|
|
Answer: Option D
Explanation:
|
11. |
How to handle error in the destructor?
|
A. |
throwing |
B.
|
terminate |
C.
|
both a & b
|
D.
|
none of the mentioned
|
|
Answer: Option B
Explanation:
It will not throw an exception from the destructor but it will the process by using terminate() function. |
|
12. |
What kind of exceptions are available in c++?
|
A. |
handled |
B.
|
unhandled |
C.
|
static
|
D.
|
dynamic
|
|
Answer: Option B
Explanation:
|
« prev
next »