What does <code>"Hi " + 5 + 2</code> produce?
- A
7 Hi
- Bcheck_circle
Hi 52
- C
Hi 7
- D
Hi 5 2
Explanation
Left-to-right: "Hi " + 5 → "Hi 5"; + 2 → "Hi 52" (string concatenation, not addition).
AP Computer Science A· difficulty 2/5
What does <code>"Hi " + 5 + 2</code> produce?
7 Hi
Hi 52
Hi 7
Hi 5 2
Explanation
Left-to-right: "Hi " + 5 → "Hi 5"; + 2 → "Hi 52" (string concatenation, not addition).
Want 10 more like this — adaptive to your weak spots?