Solved

Consider the Execution of the Following for Loop

Question 20

Multiple Choice

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.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions