1) There are following statements are given below, which of them are correct about an exception in C#.NET?
- An exception is a runtime time error that can terminate the program abnormally.
- An exception is a compile-time error.
- An exception is an error generated at the time of execution.
- In C#.NET, an exception cannot be generated by any program.
Options:
- Only A
- Only B
- A and C
- Only D
Correct answer: 3
A and C
In the given statements, A and C statements are correct about the exception.
2) There are the following options that are given below, which is not an exception?
- Divide By Zero
- Stack Overflow
- Incorrect arithmetic expression
- Insufficient Memory
Correct answer: 3
Incorrect arithmetic expression
In the given options, "Incorrect arithmetic expression" is not an exception.
3) In C#.NET, an exception is?
- Compile-time error
- Syntax error
- Logical error
- Runtime error
Correct answer: 4
Runtime error
An exception is a runtime error.
4) There are following class names are given below, which is not a predefined exception class in C#.NET?
- DivideByZeroException
- FileFoundException
- Exception
- OutOfMemoryException
Correct answer: 2
FileFoundException
In C#.NET, "FileFoundException" is not a predefined exception class.
5) There are following options are given below, which is a proper object-oriented way to handle runtime errors?
- Exceptions
- Special error codes
- OOPs codes
- OOBs codes
Correct answer: 1
Exceptions
Exceptions are a proper object-oriented way to handle runtime errors.