
Exception handling
Authored by COMP 3421
Computers
University
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
what's the output?
Error
E
f
e
f
5
e
f
5
E
f
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can we use only "try" without any other block (except, else, or finally)?
Yes
No
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the finally block in exception handling? (Choose the best one)
What is the purpose of the finally block in exception handling? (Choose the best one)
To define the exception type
To catch exceptions
To execute cleanup code regardless of whether an exception occurs or not
To abruptly terminate the program
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
whats the output? (ZeroDivisionError occurs when a value is divided by 0)
ZDE
ok
5
5
ok
ok
5
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
what is the output?
Error
1
2
0
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Whats the output?
Error
1
2
1
2
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
what's the output? (There is no parent/ child relation b/w these two error classes)
Error
1
2
1
2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?