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;
}
Answer
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment