Question

What is wrong with the following while loop?
while (sum <= 1000) {
sum = sum " 30;
}
a. The parentheses should be braces.
b. There should be a semicolon after while (sum <= 1000).
c. sum = sum " 30 should be sum = sum + 30 or else the loop may never end.
d. None of the above.

Answer

This answer is hidden. It contains 55 characters.