ExamVeda
Login
Home
Control Flow Statements in C Sharp
?

What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 2, j = 4;
    switch (i + j * 2)
    {
    case 1 :
    case 2 :
        Console.WriteLine("1 and 2");
        break;
    case 3 to 10:
        Console.WriteLine("3 to 10");
        break;
    }
    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.