Q. How many times does the “cout” in line 12 run?
Code:
#includeusing namespace std; int main() { int n = 10; for (int i = 0; i < n; i++ ) { n++; continue; cout << n; } return 1; }
β
Correct Answer: (D)
The “cout” never runs.
Explanation: The “continue” instruction will never let the “cout” instruction be executed and therefore never executed.