Home » C# Programming » Exception Handling

Which of the following statements is correct about the C#.NET program given below? using System; namespace CuriousTabConsoleApplication { 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"); } } }

Correct Answer: It will output: Index out of bounds Remaining program

← Previous Question Next Question→

More Questions from Exception Handling

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion