Vidyalelo
C# Programming · Q56

Exception Handling in C Sharp

Programming · C# Programming · question 56

Q56

What will be the output of the following C# code snippet? class program public static void Main(string[] args) try int a = args.Length; int b = 1 / a; Console.WriteLine(a); catch (ArithmeticException e) Console.WriteLine("1"); Console.ReadLine();

A.
0
B.
1
Answer
C.
Compile time error
D.
Runtime error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board