ExamVeda
Login
Home
Functions and Methods in C Sharp
?

What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        int x, y = 1;
        x = 10;
        if(x != 10 && x / Convert.ToInt32(0) == 0)
        Console.WriteLine(y);
        else
        Console.WriteLine(++y);
        Console.ReadLine();
    }
}

Answer & Solution
Correct Answer: Option B
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.