Question: Given the switch statement, which of the following would be the first if statement to replace the first test in the switch? switch (control) {
Given the switch statement, which of the following would be the first if statement to replace the first test in the switch?
switch (control)
{
case 11 : Console.WriteLine("eleven");
break;
case 12 : Console.WriteLine("twelve");
break;
case 16 : Console.WriteLine("sixteen");
break;
}
a. if (case = 11)
b. if (case == 11)
c. if (control == 11)
d. if (switch == 11)
e. none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
