What will be the output of the following C# code snippet?
{
try
{
int a, b;
b = 0;
a = 5 / b;
Console.WriteLine("A");
}
catch(ArithmeticException e)
{
Console.WriteLine("B");
}
finally
{
Console.WriteLine("C");
}
Console.ReadLine();
}
{
try
{
int a, b;
b = 0;
a = 5 / b;
Console.WriteLine("A");
}
catch(ArithmeticException e)
{
Console.WriteLine("B");
}
finally
{
Console.WriteLine("C");
}
Console.ReadLine();
}
A. A
B. B
C. B C
D. Run time error
Answer: Option C
Join The Discussion