Question: What is the output for total after the following segment of code executes? int num = 4, total = 0; switch (num) { case 1:
What is the output for total after the following segment of code executes?

int num = 4, total = 0; switch (num) { case 1: case 2: total = 5; break; case 3: total = 10; break; case 4: total total +3;B break; case 8: total total + 6; break; default: total total + 4; break; } Console.WriteLine ("The value of total is " + total); a. 0 b. 3. C. 13 d. 28 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
