Home / MCQ Bank / Computer
Computer Exception Handling In C Sharp Difficulty: Medium

What will be the output of the following C# code? { try { int []a = {1, 2, 3, 4, 5}; for (int i = 0; i < 5; ++i) Console.WriteLine(a[i]); int x = (1 / Convert.ToInt32(0)); } catch(IndexOutOfRangeException e) { Console.WriteLine("A"); } catch(ArithmeticException e) { Console.WriteLine("B"); } Console.ReadLine(); }

Select the correct option to test your answer:

More Computer Questions

Which of the following is not a map display option? What is the best case time complexity of strand sort? What is the role of the summarize() function in dplyr? How many constructors can present in a class? Which of the following is not defined under the header file stddef.h?