Guest User

Untitled

a guest
Jan 22nd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. 15. int x = 0;
  2. int y = 0;
  3. cin >> x;
  4. switch(x)
  5. {
  6. case 1 : y = 2;
  7. break;
  8. case 4 : y = 5;
  9. break;
  10. default : y = 7;
  11. }
  12. cout << y;
  13.  
  14. If the user enters 5 for variable x, what is the output?
  15.  
  16. (a) 0
  17. (b) 2
  18. (c) 5
  19. (d) 7
Add Comment
Please, Sign In to add comment