Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 3 hours ago.
I am a bit confused here, the result is 23 but I keep thinking it should be 2, I need help understanding why it's returning 23 instead of 2, thank you!
int x = 2;
switch(x){
case 1:
cout << "1";
break;
case 2:
cout << "2";
case 3:
cout << "3";
break;
default:
cout << "0";
}
Please login or Register to submit your answer