What is the value of <code>5 + 7 / 2</code>?
- Acheck_circle
8
- B
6.0
- C
6
- D
8.5
Explanation
<code>/</code> has higher precedence than <code>+</code>. 7/2 = 3 (int division), then 5 + 3 = 8.
AP Computer Science A· difficulty 3/5
What is the value of <code>5 + 7 / 2</code>?
8
6.0
6
8.5
Explanation
<code>/</code> has higher precedence than <code>+</code>. 7/2 = 3 (int division), then 5 + 3 = 8.
Want 10 more like this — adaptive to your weak spots?