Programming Logic and Design Chapter 5 Quiz – Flashcards

Unlock all answers in this set

Unlock answers
question
In a FOR statement, a loop control variable is initialized, tested, and ____
answer
Altered/Changed
question
When one loop appears inside another, the loop that is contained is called the _____loop.
answer
Nested
question
_______can ensure that a value is the correct data type or that it falls within an acceptable range.
answer
Validation
question
Adding to a variable is called_____the variable
answer
Incrementing
question
______are frequently used to accumulate totals and to validate data.
answer
Loops
question
One set of instructions that operates on multiple, separate sets of data
answer
Loop
question
Initialized before entering a while loop
answer
Loop Control Variable
question
To add a variable.
answer
Increment
question
To decrease a variable's value
answer
Decrement
question
Any numeric variable you use to count the number of times an event has occured
answer
Counter
question
A loop that may execute a different number of times each time the program executes
answer
indefinite
question
The amount by which a for loop control variable changes
answer
step value
question
Loop within a loop
answer
nested loop
question
To override incorrect data by setting the variable to a specific, predetermined value
answer
forcing
question
A variable that you use to gather values
answer
accumulator
question
In some cases, a loop control variable does not have to be initialized.
answer
False
question
Forgetting to initialize and alter the loop control variable are common mistakes that programmers make
answer
True
question
An indefinite loop is a loop that never stops
answer
False
question
The safest action is to assign the value 1 to accumulators before using them
answer
False
question
You can either increment or decrement the loop control variable
answer
True
question
Every high-level computer programming language contains a while statement
answer
True
question
It is the programmer's responsibility to initialize all variables that must start with a specific value.
answer
True
question
Both the while loop and the for loop are examples of pretest loops
answer
True
question
When one loop appears inside another it is called an indented loop.
answer
False
question
The loop control variable is initialized after entering the loop
answer
False
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New