C# Programming - Exception Handling

Exercise : Exception Handling - General Questions
  • Exception Handling - General Questions
16.
Which of the following is NOT an Exception?
StackOverflow
Division By Zero
Insufficient Memory
Incorrect Arithmetic Expression
Arithmetic overflow or underflow
Answer: Option
Explanation:
No answer description is available. Let's discuss.

17.
Which of the following statements is correct about the C#.NET program given below if a value "ABCD" is input to it?
using System;
namespace IndiabixConsoleApplication
{
    class MyProgram
    {
        static void Main(string[] args)
        {
            int index; 
            int vat = 88;
            int[] a = new int(5];
            try
            {
                Console.Write("Enter a number: ");
                index = Convert.Toint32(Console.ReadLine());
                a[index] = val;
            }
            catch(Exception e)
            {
                Console.Write("Exception occurred");
            }
            Console.Write("Remaining program");
        }
    }
}
It will output: Exception occurred
It will output: Remaining program
It will output: Remaining program Exception occurred
It will output: Exception occurred Remaining program
The value 88 will get assigned to a[0].
Answer: Option
Explanation:
No answer description is available. Let's discuss.

18.
It is compulsory for all classes whose objects can be thrown with throw statement to be derived from System.Exception class.
True
False
Answer: Option
Explanation:
No answer description is available. Let's discuss.