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:

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Systems Analysis Design Questions!