Question 1
int x = 2893;
- What does the expression " x / 10 " evaluate to?
- What does the expression " x % 10 " evaluate to?
- 289
- 3
- 3
- 289
- 289.3
- 893
- 289.3
- 3
- 289
- 2000
Explanation:
- 2893 / 10 = 289, since x is an int, it does not store the decimal value
- 2893 % 10 = 3 because the remainder of 2893/10 is 3