Exam 5: Looping

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

You can improve loop performance by using prefix incrementing.

(True/False)
4.8/5
(44)

Unlike the while and for loops, the do loop is considered to be in what category of loops?

(Multiple Choice)
4.9/5
(38)

What type of loop allows you to indicate the starting value for the loop control variable, the test condition that controls loop entry, and the expression that alters the loop control variable, all in one convenient place?

(Multiple Choice)
4.8/5
(39)

Statements in a for loop body cannot be blocked.

(True/False)
5.0/5
(34)

What type of loop is one in which the loop control variable is tested after the loop body executes?

(Multiple Choice)
4.8/5
(35)

Both the while loop and for loops are considered to be in what category of loops?

(Multiple Choice)
4.9/5
(47)

After executing your GUI program, you realize that your code has created an infinite loop.How can you break free of the loop in your GUI program?

(Multiple Choice)
4.9/5
(39)

Write a short program that prints Hello on the console four times using a while loop.

(Essay)
4.7/5
(44)

When loop structures are nested, the inner loop must be entirely contained within the outer loop; loops can never overlap.

(True/False)
4.8/5
(37)

A Boolean expression is evaluated within every while loop to determine whether the loop body will execute.

(True/False)
4.8/5
(35)

Many loop control variable values rely on an added value through each loop.What type of loop control variable is this?

(Multiple Choice)
4.8/5
(41)

What are three common ways that the value of a loop control variable is changed during the loop's execution?

(Essay)
4.8/5
(34)

Briefly describe the structure of a for loop.

(Essay)
4.8/5
(27)

What tasks can be performed in the three sections of a for loop in addition to initializing a single variable, testing the variable, and incrementing it?

(Essay)
4.9/5
(31)

What technique can be used to combine two different loops into one?

(Multiple Choice)
4.8/5
(35)

What type of loop checks a Boolean expression at the "bottom" of the loop after each repetition has occurred?

(Multiple Choice)
4.9/5
(46)

The expressions in each part of an AND or OR expression are evaluated only as much as necessary to determine whether the entire expression is true or false.What type of evaluation is this?

(Multiple Choice)
4.9/5
(35)

You cannot use a while loop for indefinite loops.

(True/False)
5.0/5
(35)

What should an accumulator variable be set to before it is used to accumulate a total?

(Multiple Choice)
4.9/5
(38)

A loop for which the number of iterations is predetermined is known as what type of loop?

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

Filters

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