Question: After executing the following code fragment, what value does the variable x contain in C ? Thank you. int x=1, y=0; switch (x) { case
After executing the following code fragment, what value does the variable x contain in C ? Thank you.
int x=1, y=0;
switch (x)
{
case 0: y = 1; break;
case 1: y = 2;
case 2: y = 3; break;
case 3: y = 4;
case 4: y = 5; break;
default: y = 6;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
