Search Header Logo

Exception handling

Authored by COMP 3421

Computers

University

Used 7+ times

Exception handling
AI

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

Media Image

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

  1. What is the purpose of the finally block in exception handling? (Choose the best one)

  1. To define the exception type

  1. To catch exceptions

  1. To execute cleanup code regardless of whether an exception occurs or not

  1. To abruptly terminate the program

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

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

Media Image

what is the output?

Error

1

2

0

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Whats the output?

Error

1

2

1

2

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?