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);
β
Correct Answer: (D)
6
int meal = 5; int tip = 2; int total = meal + (meal>6 ? ++tip : --tip);
You must be Logged in to update hint/solution