Repetition Structures Flashcards

1
Q

repeating a block of code until a condition is met.

A

REPETITION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

THREE REPETITION STRUCTURES IN C++

A
  1. WHILE STATEMENT
  2. DO-WHILE STATEMENT
  3. FOR STATEMENT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

three steps are essential for looping structures.

A
  1. Initialized the loop control variable.
  2. check the loop control variable.
  3. change the loop control variable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GENERAL FORM:

while(Boolean Expression)
{
	//Executable Statements
				⋮
}
A

WHILE statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

GENERAL FORM:

do
{
	//Executable Statements
				⋮
}
while(Boolean Expression);
A

Do-WHILE statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

GENERAL FORM:

for(initialization; check condition; increment/decrement)
{
	//Executable Statements
				⋮
}
A

for statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The _________ statement can also be used to jump out of a loop.

A

break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The _____________ statement breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop.

A

continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly