C# Exception Handling Aptitude Questions and Answers | Set 1

C# Exception Handling Aptitude Questions | Set 1: This section contains aptitude questions and answers on C# Exception Handling.
Submitted by Nidhi, on April 16, 2020

1) There are following statements are given below, which of them are correct about an exception in C#.NET?
  1. An exception is a runtime time error that can terminate the program abnormally.
  2. An exception is a compile-time error.
  3. An exception is an error generated at the time of execution.
  4. In C#.NET, an exception cannot be generated by any program.

Options:

  1. Only A
  2. Only B
  3. A and C
  4. Only D

2) There are the following options that are given below, which is not an exception?
  1. Divide By Zero
  2. Stack Overflow
  3. Incorrect arithmetic expression
  4. Insufficient Memory

3) In C#.NET, an exception is?
  1. Compile-time error
  2. Syntax error
  3. Logical error
  4. Runtime error

4) There are following class names are given below, which is not a predefined exception class in C#.NET?
  1. DivideByZeroException
  2. FileFoundException
  3. Exception
  4. OutOfMemoryException

5) There are following options are given below, which is a proper object-oriented way to handle runtime errors?
  1. Exceptions
  2. Special error codes
  3. OOPs codes
  4. OOBs codes





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.