Deck 5: Repetition Statements

ملء الشاشة (f)
exit full mode
سؤال
The line total = total + num is an example of a(n) ____ statement.

A) initialization
B) declaration
C) accumulating
D) definition
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
In a(n) ____ loop, the condition is tested before any statements in the loop are executed.

A) posttest
B) pretest
C) prior
D) early-test
سؤال
The do while construct is an example of a posttest loop.
سؤال
The construction for ( ; count is invalid.
سؤال
Combining interactive data entry with the repetition capabilities of the while statement produces adaptable and powerful programs.
سؤال
A(n) ____ loop is a loop that never ends.

A) fixed
B) controlled
C) infinite
D) finite
سؤال
A(n) ____ statement both defines the boundaries containing the repeating section of code and controls whether the code will be executed.

A) declaration
B) selection
C) arithmetic
D) repetition
سؤال
As a general rule, the continue statement is less useful than the break statement.
سؤال
Entering data interactively in a loop is a general technique that s applicable to for loops.
سؤال
In C++, continue produces the same action for both while and for statements.
سؤال
Three different forms of repetition statements are provided in C++: while , ____, and do while .

A) for
B) if-else
C) switch
D) if-else chain
سؤال
____ loops always execute the loop statements at least once before the condition is tested.

A) Pretest
B) Posttest
C) entrance-controlled
D) beforetest
سؤال
The do statement is particularly useful in filtering user-entered input and providing data validation checks.
سؤال
C++ s for statement is virtually interchangeable with its while statement.
سؤال
In C++, a ____ loop is constructed using a while statement.

A) while
B) whereas
C) do
D) switch
سؤال
A loop that evaluates a condition at the end of the repeating section of code is referred to as a(n) ____ loop.

A) entrance-controlled
B) pretest
C) exit-controlled
D) aftertest
سؤال
The for statement performs the same functions as the while statement, but uses a different form.
سؤال
In a ____ loop, the condition is used to keep track of how many repetitions have occurred.

A) pretest
B) posttest
C) variable-condition
D) fixed-count
سؤال
Both the ____ and for loop structures are examples of entrance-controlled loops.

A) while
B) switch
C) do while
D) if-else
سؤال
Loop structures can evaluate the condition only at the beginning of the repeating section of code.
سؤال
Values used to control a loop can be set by using ____.

A) variables
B) constants
C) conditional statements
D) either a or b
سؤال
The ____ error means the loop executes either one too many or one too few times than was intended.

A) miscalculation
B) off by one
C) less-count
D) too-many-few
سؤال
In C++, a ____ loop is constructed using a for statement.

A) for
B) time
C) selection
D) switch
سؤال
Inside the parentheses of the for statement are three items, separated by ____.

A) dots
B) commas
C) colons
D) semicolons
سؤال
When ____ is encountered in a loop, the next iteration of the loop begins immediately.

A) goto
B) go
C) resume
D) continue
سؤال
Posttest loops can be constructed in C++ using ____ loops.

A) while
B) do while
C) for
D) if-else chain
سؤال
A(n) _______________ statement defines the boundaries of a repeating section of code and controls whether the code is executed.
سؤال
In C++, a posttest loop can be created by using a(n) ____ statement.

A) if
B) case
C) do
D) for
سؤال
A(n) ____________________ loop s test condition evaluates to a non-zero value on every repetition.
سؤال
A common programming technique is to use a for or ____ loop to cycle through a set of numbers and select numbers meeting one or more criteria.

A) while
B) if-else
C) switch
D) break
سؤال
In a(n) ____________________-condition loop, the tested condition doesn t depend on a count being reached; instead, it continues until a specified value is encountered.
سؤال
In computer programming, data values used to signal the start or end of a data series are called ____.

A) sentinels
B) marks
C) dummies
D) interrupts
سؤال
A semicolon with nothing preceding it is also a valid statement, called the ____ statement.

A) empty
B) null
C) blank
D) void
سؤال
A(n) ____ statement forces an immediate exit from the switch , while , for and do-while statements.

A) exit
B) break
C) stop
D) halt
سؤال
Entrance-controlled loops are also referred to as ____________________ loops.
سؤال
Typically, null statements are used with while or ____ statements.

A) if-else
B) switch
C) for
D) case
سؤال
C++ s ____________________ statement is virtually interchangeable with its while statement.
سؤال
A loop contained within another loop is called a ____ loop.

A) compound
B) composed
C) complex
D) nested
سؤال
In Visual Basic and Pascal, the for statement can be used only to construct ____ loops.

A) posttest
B) exit-controlled
C) fixed-count
D) variable-condition
سؤال
A(n) ____ forces control to be passed to the altering list in a for statement.

A) exit
B) continue
C) interrupt
D) next
سؤال
Inside the parentheses of the for statement, the ____________________ list provides the increment value that s added to or subtracted from the counter each time the loop is executed.
سؤال
The semicolon at the end of the statement for (count = 0; count is called a(n) ____________________ statement.
سؤال
The ____________________ statement violates pure structured programming principles because it provides a second, nonstandard exit from a loop.
سؤال
In computer programming, a data value used to signal the start or end of a data series is called a(n) ____________________.
سؤال
In C++, the ____________________ statement can replace or be replaced by an equivalent while or for statement.
سؤال
A common programming error is omitting the final ____________________ from the do statement.
سؤال
When a(n) ____________________ statement is encountered in a loop, the next iteration of the loop begins immediately.
سؤال
A(n) ____________________ statement is used where a statement is required syntactically, but no action is called for.
سؤال
A do while loop is an example of a(n) ____________________-controlled loop.
سؤال
The loop created by the statement for (i = 0; i executes ____________________ times
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Repetition Statements
1
The line total = total + num is an example of a(n) ____ statement.

A) initialization
B) declaration
C) accumulating
D) definition
C
2
In a(n) ____ loop, the condition is tested before any statements in the loop are executed.

A) posttest
B) pretest
C) prior
D) early-test
B
3
The do while construct is an example of a posttest loop.
True
4
The construction for ( ; count is invalid.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Combining interactive data entry with the repetition capabilities of the while statement produces adaptable and powerful programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n) ____ loop is a loop that never ends.

A) fixed
B) controlled
C) infinite
D) finite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
A(n) ____ statement both defines the boundaries containing the repeating section of code and controls whether the code will be executed.

A) declaration
B) selection
C) arithmetic
D) repetition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
As a general rule, the continue statement is less useful than the break statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Entering data interactively in a loop is a general technique that s applicable to for loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
In C++, continue produces the same action for both while and for statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
Three different forms of repetition statements are provided in C++: while , ____, and do while .

A) for
B) if-else
C) switch
D) if-else chain
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
____ loops always execute the loop statements at least once before the condition is tested.

A) Pretest
B) Posttest
C) entrance-controlled
D) beforetest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The do statement is particularly useful in filtering user-entered input and providing data validation checks.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
C++ s for statement is virtually interchangeable with its while statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
In C++, a ____ loop is constructed using a while statement.

A) while
B) whereas
C) do
D) switch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
A loop that evaluates a condition at the end of the repeating section of code is referred to as a(n) ____ loop.

A) entrance-controlled
B) pretest
C) exit-controlled
D) aftertest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The for statement performs the same functions as the while statement, but uses a different form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
In a ____ loop, the condition is used to keep track of how many repetitions have occurred.

A) pretest
B) posttest
C) variable-condition
D) fixed-count
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Both the ____ and for loop structures are examples of entrance-controlled loops.

A) while
B) switch
C) do while
D) if-else
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Loop structures can evaluate the condition only at the beginning of the repeating section of code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Values used to control a loop can be set by using ____.

A) variables
B) constants
C) conditional statements
D) either a or b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ____ error means the loop executes either one too many or one too few times than was intended.

A) miscalculation
B) off by one
C) less-count
D) too-many-few
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
In C++, a ____ loop is constructed using a for statement.

A) for
B) time
C) selection
D) switch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Inside the parentheses of the for statement are three items, separated by ____.

A) dots
B) commas
C) colons
D) semicolons
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
When ____ is encountered in a loop, the next iteration of the loop begins immediately.

A) goto
B) go
C) resume
D) continue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Posttest loops can be constructed in C++ using ____ loops.

A) while
B) do while
C) for
D) if-else chain
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
A(n) _______________ statement defines the boundaries of a repeating section of code and controls whether the code is executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
In C++, a posttest loop can be created by using a(n) ____ statement.

A) if
B) case
C) do
D) for
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____________________ loop s test condition evaluates to a non-zero value on every repetition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
A common programming technique is to use a for or ____ loop to cycle through a set of numbers and select numbers meeting one or more criteria.

A) while
B) if-else
C) switch
D) break
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
In a(n) ____________________-condition loop, the tested condition doesn t depend on a count being reached; instead, it continues until a specified value is encountered.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In computer programming, data values used to signal the start or end of a data series are called ____.

A) sentinels
B) marks
C) dummies
D) interrupts
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
A semicolon with nothing preceding it is also a valid statement, called the ____ statement.

A) empty
B) null
C) blank
D) void
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ____ statement forces an immediate exit from the switch , while , for and do-while statements.

A) exit
B) break
C) stop
D) halt
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Entrance-controlled loops are also referred to as ____________________ loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Typically, null statements are used with while or ____ statements.

A) if-else
B) switch
C) for
D) case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
C++ s ____________________ statement is virtually interchangeable with its while statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
A loop contained within another loop is called a ____ loop.

A) compound
B) composed
C) complex
D) nested
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
In Visual Basic and Pascal, the for statement can be used only to construct ____ loops.

A) posttest
B) exit-controlled
C) fixed-count
D) variable-condition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
A(n) ____ forces control to be passed to the altering list in a for statement.

A) exit
B) continue
C) interrupt
D) next
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
Inside the parentheses of the for statement, the ____________________ list provides the increment value that s added to or subtracted from the counter each time the loop is executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The semicolon at the end of the statement for (count = 0; count is called a(n) ____________________ statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The ____________________ statement violates pure structured programming principles because it provides a second, nonstandard exit from a loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
In computer programming, a data value used to signal the start or end of a data series is called a(n) ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
In C++, the ____________________ statement can replace or be replaced by an equivalent while or for statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
A common programming error is omitting the final ____________________ from the do statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
When a(n) ____________________ statement is encountered in a loop, the next iteration of the loop begins immediately.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
A(n) ____________________ statement is used where a statement is required syntactically, but no action is called for.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
A do while loop is an example of a(n) ____________________-controlled loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The loop created by the statement for (i = 0; i executes ____________________ times
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.