ExamVeda
Login
Home
Exception Handling in C Sharp
?

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