Exam 5: Looping

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In order for a C++ program to read data from a file,

(Multiple Choice)
4.9/5
(84)

A(n) ________ is a variable that controls the number of times a loop iterates.

(Multiple Choice)
4.8/5
(86)

What will the following code print? Num = 8; Cout << --num << " "; Cout << num++ << " "; Cout << num;

(Multiple Choice)
4.7/5
(75)

What will the following code print? Num = 5; Cout << num++ << " "; Cout << num-- << " "; Cout << --num;

(Multiple Choice)
4.7/5
(84)

The statements in the body of a do-while loop are executed

(Multiple Choice)
4.9/5
(76)

A while loop is somewhat limited because the counter can only be incremented or decremented by one each time through the loop.

(True/False)
4.9/5
(71)

The while loop has two important parts: a condition that is tested and a statement or block of statements that is executed

(Multiple Choice)
4.9/5
(76)

The ideal type of loop to use for repeating a menu is a(n) ________ loop.

(Multiple Choice)
5.0/5
(71)

A(n) ________ is a special value that marks the end of a list of values.

(Multiple Choice)
4.9/5
(76)

The ideal type of loop to use if you want a user to enter exactly 20 values is a(n) ________ loop.

(Multiple Choice)
4.7/5
(77)

A sentinel is a special value that

(Multiple Choice)
4.8/5
(87)

To decrement a number means to increase its value.

(True/False)
4.7/5
(77)

To ________ a value means to increase it.

(Multiple Choice)
4.8/5
(83)

If nothing within a while loop ever causes the condition to become false, a(n) ________ may occur.

(Multiple Choice)
5.0/5
(81)

For data validation, it is best to use a(n)

(Multiple Choice)
4.9/5
(75)

A variable that keeps a running total of data values is called a(n)

(Multiple Choice)
4.9/5
(89)

The ________ statement causes a loop to terminate early.

(Multiple Choice)
4.8/5
(89)

The block of code in the body of a while statement can contain an unlimited number of statements, provided they are enclosed in a set of braces.

(True/False)
4.8/5
(103)

The while loop is a(n) ________ loop, whereas the do-while loop is a(n) ________ loop.

(Multiple Choice)
4.8/5
(84)

The ++ operator

(Multiple Choice)
4.9/5
(80)
Showing 21 - 40 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)