11
What is the output of the following program?
try { int.Parse("abc"); }
catch (FormatException) { Console.Write("format"); }DiscussEasy
Loading subject content…
Loading practice questions…
What is the output of the following program?
try { int.Parse("abc"); }
catch (FormatException) { Console.Write("format"); }What is the output of the following program?
string? s = null;
try { Console.Write(s!.Length); }
catch (NullReferenceException) { Console.Write("null"); }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"); }What is the output of the following program?
try { Console.Write("A"); }
finally { Console.Write("B"); }