Question

What will the following program segment do?
int counter{1};
do
{
cout << counter << " ";
} while (++counter <= 10);
a. Print the numbers 1 through 11.
b. Print the numbers 1 through 10.
c. Print the numbers 1 through 9.
d. Cause a syntax error.

Answer

This answer is hidden. It contains 28 characters.