What does <code>5 + 2 + " items"</code> produce?
- A
Compiler error
- B
52 items
- Ccheck_circle
7 items
- D
5 2 items
Explanation
Left-to-right: 5 + 2 → 7 (numeric addition); 7 + " items" → "7 items".
AP Computer Science A· difficulty 3/5
What does <code>5 + 2 + " items"</code> produce?
Compiler error
52 items
7 items
5 2 items
Explanation
Left-to-right: 5 + 2 → 7 (numeric addition); 7 + " items" → "7 items".
Want 10 more like this — adaptive to your weak spots?