ExamVeda
Login
Home
Exception Handling in C Sharp
?

What will be the output of the following C# code?
{
    int sum = 10;
    try
    {
        int i;
        for (i = -1; i < 3; ++i)
        sum = (sum / i);
    }
    catch (ArithmeticException e)
    {
        Console.WriteLine("0");
    }
    Console.WriteLine(sum);
    Console.ReadLine();
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.