Answer to Question #288544 in C++ for fisiwe

Question #288544

Suppose the input value for a is 5. What is the value of a after the following C++ code has been executed?

int a;

cin >> a;

switch (a)

{

case 1: a += 3;

case 3: a = a * 3; break;

case 5: a = ++a + 10; case 6: a /= 2; default: a = a + 1;

}


1
Expert's answer
2022-01-18T13:02:56-0500

Answer

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog