CSC 200 Quiz 2/21
How many times will the following loop display "Hello"? for (int i = 0; i < 20; i++) cout << "Hello!" << endl; A. 20 B. 21 C. 19 D. an infinite number of times
20
This statement causes a loop to terminate early. A. terminate B. null C. stop D. break E. None of these
break
This is a variable that is regularly incremented or decremented each time a loop iterates. A. counter B. constant C. control statement D. null terminator E. None of these
counter
This is a control structure that causes a statement or group of statements to repeat. A. constant B. decision statement C. cout object D. loop E. None of these
loop
This is a pre-test loop that is ideal in situations where you do not want the loop to iterate if the condition is false from the beginning. A. while B. infinite C. for D. do-while E. None of these
while