CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics

switch Statement Output

C# quiz · Question 17
mediumConditionals

What does this code print?

Code

1int x = 2;
2switch (x) {
3 case 1:
4 Console.Write("one");
5 break;
6 case 2:
7 Console.Write("two");
8 break;
9 default:
10 Console.Write("other");
11 break;
12}