NET2

NET2

University

30 Qs

quiz-placeholder

Similar activities

Exception Handling

Exception Handling

University

25 Qs

NEUROGENIC BLADDER AND BOWEL DYSFUNCTION

NEUROGENIC BLADDER AND BOWEL DYSFUNCTION

University

30 Qs

Python-Week7

Python-Week7

University

25 Qs

Perjumpaan Kadet Polis

Perjumpaan Kadet Polis

1st Grade - University

32 Qs

DH-Tooth and Crown Anatomy Part 1

DH-Tooth and Crown Anatomy Part 1

University

32 Qs

Java7

Java7

University

30 Qs

CODE WARRIORS

CODE WARRIORS

University

30 Qs

Zoologia final

Zoologia final

University

35 Qs

NET2

NET2

Assessment

Quiz

Other

University

Hard

Created by

Surabhi Palkar

Used 4+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

An event that occurs during the execution of a program that is unexpected by the program code is known as ____.

Multiple catch

Exception

Nested try catch

None of the given

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which among the following is an exception?

Referencing the null object

Invalid typecasting

Invalid private or protected field access

All of the given

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What allows you to test code for errors?

Exception

Try

Validation

None of the given

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The try and catch keywords come in pair.

True

False

Depends upon the programmer D

Sometimes true sometimes false

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these keywords is not a part of exception handling?

try

finally

thrown

catch

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of the following C# code?

static void Main(string[] args)

{               

try     {       

Console.WriteLine("Java" + " " + 1/Convert.ToInt32(0));   

}   

catch(ArithmeticException e)    

{       

Console.WriteLine("Csharp");            

}   

Console.ReadLine();

}

Csharp

Java

Java 0

Run time error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the wrong statement about exception handling in C#.NET?

Finally clause is used to perform cleanup operations of closing network and database connections

the statement in final clause will get executed no matter whether an exception occurs or not

a program can contain multiple finally clauses

all of the given

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?