OOPS MCQ UNIT-V

Estudies4you
OOPS MCQ JNTUH
UNIT V 
I. Fill in the Blanks  
1. ________ is a process to manage exceptions occurred at runtime. 

2. ________ errors are generated while program execution. 

3.  ________ is a keyword that is used to detect the exceptions. 

4. An exception detected in try block is thrown using ________ keyword. 

5. The ________ block handles an exception thrown by the try block. 

6. A ________ is defined for catching all the exceptions thrown by using different throw statements. 

7. The object that holds the error information is called ________

8.  ________ can be defined as a process of specifying the user about possible exception that can be occurred. 

9. The process by which compound statements and function definitions exit because of throw exception is called ________

10. The exception received by catch block is passed to another exception handler then it is referred as ________ 

II. Multiple Choice 
1. An error occurred at runtime is called as  ________ 
(a) Exception 
(b) Compile-time error 
(c) Run-time error 
(d) Run-time exception 

2. Exception handling separates normal code and error handling code by using ________ 
(a) Try-catch block 
(b) Throw block 
(c) Finally block 
(d) Try block 

3. The point at which an exception is thrown is called a ________.
(a) Void point 
(b) Throw point 
(c) Thrown point 
(d) None of the above 

4. The catch block must be immediately followed by ________ 
(a) Throws block 
(b) Finally block 
(c) Try block 
(d) Exception handler 

5. Which of the following defines actions to be taken when a run time error occurs? 
(a) Catch block 
(b) Try block
(c) Finally 
(d) None of these

6. Exception object is thrown by ________ 
(a) Try block 
(b) Catch block 
(c) Exception class 
(d) Finally block 

7. Which of the following is the syntax of exception specifications? 
(a) Return type function_name(arg_list) 
(b) Return type function_name(arg_list) throw (list of datatypes) 
(c) function_name(arg_list) 
(d) function_name(arg_list) throw (list of datatypes) 

8. Which process results in object destruction in the reverse order of creation? 
(a) Stack unwinding 
(b) Exception specification
(c) Synchronous exception 
(d) Asynchronous exception

9. An exception can only be rethrown from within a ________ 
(a) Catch block 
(b) Try block 
(c) Throw block 
(d) Throws block 

10. A single catch block is defined for catching all exceptions is of ________ 
(a) Generic type 
(b) bounded type
(c) Object type
(d) None of the above

III. Match the Fallowing 

1. Exception

[  ]

(a) Returns actual messages

2. Try

[  ]

(b) catch block

3. what()

[  ]

(c) Detecting run time errors

4. Generic type

[  ]

(d) return type function_name(arguments)

5. Exception specification

[  ]

(e) run time error




To Top