Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
20 Cards in this Set
- Front
- Back
The structure that allows you to write one set of instructions that operates on multiple, separate sets of data is the __________.
a. Sequence b. Selection C. Loop d. Case |
C
|
|
Every structured loop_______.
a. Has one entry point b. Has two exit points c. Refers to a counter that increases on each pass through the loop d. Contains a body that must execute at lease one time |
A
|
|
Which of the following is not a step that must occur with every correctly working loop?
a. Initialize a loop control variable before the loop starts. b. Set the loop control value equal to a sentinel during each iteration c. Compare the loop control value to a entinel during each iteration d. Alter the loop control variable during each iteration. |
B
|
|
The statements executed within a loop are known collectively as the ______
a. Loop body b. Loop controls C. Sequences d. Sentinels |
A
|
|
A counter keeps track of ______
a. The number of times an event has occurred b. The number of machine cycles required by a segment of a program c. The number of loop structures within a program d. The number of times software has been revised. |
A
|
|
Adding 1 to a variable is also called ______ it
a. Digesting b. Resetting c. Decrementing d. Incrementing |
D
|
|
Which of the following is a definite loop?
a. A loop that executes as long as a user continues to enter valid data b. A loop that executes 1000 times c. Both of the above d. None of the above |
B
|
|
Which of the following is an indefinite loop?
a. A loop that executes 10 times b. A loop that follows a prompt that asks a user how many repetitions to make and uses that value to control the loop c. Both of the above d. None of the above |
D
|
|
When you decrement a variable, you ______
a. Set it to 0 b. Reduce it by one tenth c. Subtract 1 from it d. Remove it from a program |
C
|
|
When two loops are nested, the loop that is contained by the other is the ______ loop
a. Captive b. Unstructured c. Inner d. Outer |
C
|
|
When loops are nested, ______
a. The typically share a loop control variable b. One must end before the other begins c. Both must be the same type--definite or indefinite d. None of the above |
D
|
|
The chief advantage to using a for loop is
a. Infinite loops are prevented b. Unlike a while loop, a for can be nested c. Its syntax is concise d. Unlike a while loop, a for loop can have multiple entry and exit points |
B
|
|
A report that lists only totals, with no details about individual records, is a(n)______ report
a. Accumulator b. Final c. Summary d. Detailless |
C
|
|
Typically, the value added to a counter variable is ______
a.0 b.1 c. The same for each iteration d. Different in each iteration |
B
|
|
Typically, the value added to an accumulator variable is ______
a. 0 b. 1 c. The same for each iteration d. Different in each iteration |
D
|
|
After an accumulator or counter variable is displayed at the end of a program, it is best to ______
a. Delete the variable from the program b. Reset the variable to 0 c. Subtract 1 from the variable d. None of the above |
D
|
|
When you ______ , you make sure data items are the correct type and fall within the correct range.
a. Validate data b. Employ offensive programming c. Use object orientation d. Count loop iterations |
A
|
|
Overriding a user's entered value by setting it to a predetermined value is known as ______
a. Forcing b. Accumulating c. Validating d. Pushing |
A
|
|
To ensure that a user's entry is the correct data type, frequently you ____________
a. Prompt the user to verify that the type is correct b. Use a method built into the programming language c. Include a statement at the beginning of the program that lists the data types allowed d. All of the above |
B
|
|
Variables might hold incorrect values even when they are
a. The correct data b. Within a required range c. Coded by the programming rather than input by a user d. All of the above |
D
|