C# Exception Handling Interview Questions and Answers - 2

Question: 6

List some of the common c# exceptions?

Divide By Zero Exception –An attempt to divide value by zero.

Argument out of Range Exception- Argument value is out of range.

Arithmetic Exception – Arithmetic Overflow underflow occurs.

Format Exception – The format of an argument is wrong.

Question: 7

Give the reasons for the compile time errors?

Reasons for compile time errors

Misspelling of keywords, identifiers.

Missing of double Quotes.

Missing Semicolons, brackets.

Usage of non declared variables

Question: 8

What are the reasons for runtime error?

Reasons for runtime error

Trying to divide the value by zero.

Accessing of an element which is not in array bound.

Incompatible type

Mismatching of data types for array/ variables.

Related Questions