ExamVeda
Login
Home
Control Flow Statements in C Sharp
?

What will be the output of the following C# code?
static void Main(string[] args)
{
    switch (5)
    {
    case 5.0f: 
        Console.WriteLine("harsh");
        break;
    case 5: 
        Console.WriteLine("amish");
        break;
    case 5.0L: 
        Console.WriteLine("ANKIT");
        break;
    default:
        Console.WriteLine("ashish");
    }
    Console.ReadLine();
}

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