Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 15. int x = 0;
- int y = 0;
- cin >> x;
- switch(x)
- {
- case 1 : y = 2;
- break;
- case 4 : y = 5;
- break;
- default : y = 7;
- }
- cout << y;
- If the user enters 5 for variable x, what is the output?
- (a) 0
- (b) 2
- (c) 5
- (d) 7
Add Comment
Please, Sign In to add comment