LogiQuest
Back to Control Instructions
12

What is the output of the following program?

string grade = "B";
switch (grade)
{
    case "A": Console.Write("Top"); break;
    case "B":
    case "C": Console.Write("Pass"); break;
    default: Console.Write("Fail"); break;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.