Exam 5: Looping
Exam 1: A First Program Using C42 Questions
Exam 2: Using Data42 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide42 Questions
Exam 4: Making Decisions42 Questions
Exam 5: Looping42 Questions
Exam 6: Using Arrays42 Questions
Exam 7: Using Methods42 Questions
Exam 8: Advanced Method Concepts42 Questions
Exam 9: Using Classes and Objects42 Questions
Exam 10: Introduction to Inheritance42 Questions
Exam 11: Exception Handling42 Questions
Exam 12: Using Controls42 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams42 Questions
Select questions type
A Boolean expression is evaluated within every while loop to determine whether the loop body will execute.
(True/False)
4.7/5
(37)
Often, totals are ____; that is, summed one at a time in a loop.
(Multiple Choice)
5.0/5
(41)
When a loop might execute many times, it becomes increasingly important to consider the number of evaluations that take place. How can considering the order of evaluation of short-circuit operators affect the performance of a loop?
(Essay)
4.8/5
(42)
When loops are nested, each pair contains a(n) ____ loop and an outer loop.
(Multiple Choice)
4.9/5
(35)
The ____ loop checks a Boolean expression at the "bottom" of the loop after each repetition has occurred.
(Multiple Choice)
4.7/5
(40)
The ____ loop checks a Boolean expression at the "top" of the loop before the body has a chance to execute.
(Multiple Choice)
4.7/5
(38)
Many loop control variable values are altered by ____ (or adding to) them.
(Multiple Choice)
4.9/5
(37)
You can use a(n) ____________________ loop to execute a body of statements continuously as long as some condition continues to be true .
(Short Answer)
4.8/5
(29)
The expressions in each part of an AND or OR expression use ____ evaluation; that is, they are evaluated only as much as necessary to determine whether the entire expression is true or false .
(Multiple Choice)
4.9/5
(33)
Event-driven GUI programs sometimes require fewer coded loops than their counterpart console applications because some events are determined by the ____ when the program is running.
(Multiple Choice)
4.8/5
(31)
The block of statements executed in a loop is known as the ____.
(Multiple Choice)
4.9/5
(37)
An accumulator variable must be set to ____ before it is used to accumulate a total.
(Multiple Choice)
4.8/5
(39)
When a variable is declared inside a loop, it can be referenced only for the duration of the loop body. Once the loop finishes execution, the variable is out of ____________________, which means it is not usable because it has ceased to exist.
(Short Answer)
4.8/5
(30)
With a ____ loop, you can 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
(36)
Suppose a loop should execute while x is less than the sum of two integers, a and b . The loop could be written as:
while (x
// loop body
Although this code fragment will run, it is not particularly efficient. In what way is it inefficient, and how could you improve the loop's performance?
(Essay)
4.9/5
(39)
A(n) ____ loop is one in which the loop control variable is tested after the loop body executes.
(Multiple Choice)
4.8/5
(32)
Often, the value of a loop control variable is not altered by arithmetic, but instead is altered by user input. This type of loop is a(n) ____ loop.
(Multiple Choice)
4.9/5
(37)
What are three common ways that the value of a loop control variable is changed during the loop's execution?
(Essay)
4.9/5
(40)
Showing 21 - 40 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)