Discussion :: Exception Handling
-
Which of the following statements is correct about the C#.NET program given below?
using System; namespace FreshergateConsoleApplication { class MyProgram { static void Main(string[] args) { int index = 6; int val = 44; int[] a = new int[5]; try { a [index] = val ; } catch(IndexOutOfRangeException e) { Console.Write("Index out of bounds "); } Console.Write("Remaining program"); } } }
A.
Value 44 will get assigned to a[6]. |
B.
It will output: Index out of bounds |
C.
It will output: Remaining program |
D.
It will not produce any output. |
E.
It will output: Index out of bounds Remaining program |
Answer : Option E
Explanation :
No answer description available for this question.
Be The First To Comment