LogiQuest
Back to Exception Handling
9

What is the output of the following program?

try
{
    int[] a = new int[2];
    a[5] = 1;
}
catch (IndexOutOfRangeException) { Console.Write("index"); }
catch (Exception) { Console.Write("other"); }
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.