Filters
Question type

Study Flashcards

Many loop control variable values are altered by ____, or adding to them.


A) incrementing
B) decrementing
C) accumulating
D) deprecating

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

How might user data be validated?

Correct Answer

verifed

verified

When you ask a user to enter data into a...

View Answer

A(n) ____ is very similar to a counter that you use to count loop iterations, except that you usually add a value other than one to this type of variable.


A) transaction
B) total
C) validator
D) accumulator

E) None of the above
F) A) and D)

Correct Answer

verifed

verified

When one loop appears inside another, the loop that contains the other loop is called the ____ loop.


A) indefinite
B) definite
C) inner
D) outer

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

When are you required to use a for statement, and what are the advantages of for statements?

Correct Answer

verifed

verified

You never are required to use a for stat...

View Answer

Match each term with a statement below.

Premises
The amount by which a for loop control variable changes
Responses
loop control variable
indefinite
accumulator
nested loops
step value
increment
forcing
counter
loop
decrement

Correct Answer

loop control variable
indefinite
accumulator
nested loops
step value
increment
forcing
counter
loop
decrement

A(n) ____ is any numeric variable you use to count the number of times an event has occurred.


A) accumulator
B) key
C) index
D) counter

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

The safest action is to assign the value 1 to accumulators before using them.

A) True
B) False

Correct Answer

verifed

verified

What are common mistakes made by programmers in coding loops?

Correct Answer

verifed

verified

• Failing to initialize the loop control...

View Answer

Match each term with a statement below.

Premises
To decrease a variable's value
Responses
nested loops
step value
counter
decrement
increment
forcing
loop control variable
loop
accumulator
indefinite

Correct Answer

nested loops
step value
counter
decrement
increment
forcing
loop control variable
loop
accumulator
indefinite

____________________ can ensure that a value is the correct data type or that it falls within an acceptable range.

Correct Answer

verifed

verified

validation...

View Answer

Forgetting to initialize and alter the loop control variable are common mistakes that programmers sometimes make.

A) True
B) False

Correct Answer

verifed

verified

An indefinite loop is a loop that never stops.

A) True
B) False

Correct Answer

verifed

verified

A(n) ____ loop executes a predetermined number of times.


A) terminal
B) definite
C) indefinite
D) infinite

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

The ____ loop provides three actions in one compact statement.


A) for
B) while
C) do until
D) repeat

E) None of the above
F) All of the above

Correct Answer

verifed

verified

Usually, when you create nested loops, each loop has its own ____.


A) sentinel value
B) goto statement
C) entrance condition
D) loop control variable

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Match each term with a statement below.

Premises
A variable that you use to gather values
Responses
indefinite
forcing
accumulator
decrement
loop control variable
step value
counter
loop
nested loops
increment

Correct Answer

indefinite
forcing
accumulator
decrement
loop control variable
step value
counter
loop
nested loops
increment

Match each term with a statement below.

Premises
One set of instructions that operates on multiple, separate sets of data
Responses
loop control variable
nested loops
forcing
counter
accumulator
indefinite
decrement
increment
step value
loop

Correct Answer

loop control variable
nested loops
forcing
counter
accumulator
indefinite
decrement
increment
step value
loop

A mistake programmers often make with loops is that they ____.


A) neglect to initialize the loop control variable prior to entering the loop body
B) increment the loop control variable inside of the loop body
C) validate data to ensure values are the correct data type or that they fall within an acceptable range
D) enclose the inner loop entirely within the outer loop in a nested loop

E) A) and D)
F) C) and D)

Correct Answer

verifed

verified

What are the tasks performed by the for count = 0 to 3 statement?

Correct Answer

verifed

verified

This for statement accomplishes several ...

View Answer

Showing 21 - 40 of 60

Related Exams

Show Answer