x.Hmp;(TCO 5) When you want a loop\'s body to execute at least once you would us
ID: 3618910 • Letter: X
Question
x.Hmp;(TCO 5) When you want a loop's body to execute at least once you would use what type of loop? (Points: 2)While..loop
Do..while loop
For..loop
None of the above
2. (TCO 5) A variable used to count the number of times an event has occurred is called a/an ________ ? (Points: 2)
counter
accumulator
sentinel
control variable
3. (TCO 5) A loop for which you cannot predetermine the number of executions is a/an ________? (Points: 2)
Indefinite loop
Definite loop
Infinite loop
Nested loop
4. (TCO 5) Where does the loop condition of a pretest loop appear? (Points: 2)
at the beginning
at the end
in the middle
no where
5. (TCO 5) Some loops require the user to enter a special value to end the loop. That special value is called _______? (Points: 2)
sentinel value
pretest value
post test value
None of the above
6. (TCO 5) A loop for which you can predetermine the number of executions is a/an __________? (Points: 2)
Indefinite loop
Definite loop
Infinite loop
Nested loop
7. (TCO 5) A variable that is used to sum values is called a/an ________? (Points: 2)
Counter
Sentinel
Accumulator
Indefinite
8. (TCO 5) Which statement is not equivalent to x = x + 1? (Points: 2)
x++
x += 1
x = 1 + x
x =+ 1
9. (TCO 5) What would be the output of the following statements:
int I = 0;
while (I < 5) {
cout << I;
I++;
} (Points: 2)
Explanation / Answer
x.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.