Home » C# Programming » Exception Handling

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 CuriousTabConsoleApplication { 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"); } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!