Question

Consider the execution of the following for loop
for (int x = 1; x < 5; increment) {
cout << x + 1 << endl;
}
If the last value printed is 5, which of the following might have been used for increment?
a. x++
b. x += 1
c. ++x
d. Any of the above.

Answer

This answer is hidden. It contains 16 characters.