A
Q. What is the value of tip after executing the following code snippet?
Code:
int meal = 5;
int tip = 2;
int total = meal + (meal>6 ? ++tip : --tip);
int tip = 2;
int total = meal + (meal>6 ? ++tip : --tip);
- Correct Answer - Option(D)
- Views: 34
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.