Unit 4: Looping

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering loop types, iteration concepts, and control statements in C++ programming.

Last updated 3:51 AM on 9/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

Loop

A control structure in programming that allows a program to repeat a set of instructions repeatedly until a specific condition is satisfied.

2
New cards

Repetition (Iteration)

The concept of executing a block of code or a set of instructions multiple times until a specific condition is met or for a predefined number of times.

3
New cards

For Loop

A loop construct used when the number of iterations is known in advance, consisting of three parts inside parentheses: initialization, condition, and update.

4
New cards

Initialization (in For Loop)

The start point in a for loop that sets or declares the initial value of the loop control variable.

5
New cards

Condition (in For Loop)

The end point test in a loop that determines whether the loop continues executing or terminates.

6
New cards

Update (in For Loop)

The step change component in a for loop that modifies the loop variable after each iteration.

7
New cards

While Loop

A loop control structure that executes a block of code as long as a condition remains true, typically used when the number of iterations is not known in advance.

8
New cards

Do-While Loop

A loop structure that evaluates its condition at the end of each cycle, guaranteeing that the code block executes at least once.

9
New cards

Nested Loop

A loop placed inside another loop where the inner loop completes all its iterations before the outer loop moves to the next iteration.

10
New cards

Outer Loop

The enclosing loop in a nested loop structure, which controls major iterations such as rows in grid or pattern structures.

11
New cards

Inner Loop

The enclosed loop in a nested loop structure that runs through all its cycles during each single iteration of the outer loop.

12
New cards

Break Statement

A loop control statement that immediately exits from the loop entirely.

13
New cards

Continue Statement

A loop control statement that skips the current iteration and proceeds directly to the next iteration of the loop.

14
New cards
<p>Break Statement Implementation</p>

Break Statement Implementation

A C++ program showing the break statement exiting the loop immediately when i=5i = 5.

15
New cards
<p>Continue Statement Implementation</p>

Continue Statement Implementation

A C++ program showing the continue statement skipping the loop body when i=5i = 5 and moving to the next iteration.

16
New cards
<p>2D Matrix Traversal Code</p>

2D Matrix Traversal Code

A C++ code example demonstrating nested loops to iterate through rows and columns of a 2×32 \times 3 matrix.

17
New cards
<p>Factorial Calculation Loop</p>

Factorial Calculation Loop

A C++ code example using a for loop from 11 to nn to calculate factorial using multiplication accumulation.

18
New cards
<p>Sentinel-Controlled While Loop</p>

Sentinel-Controlled While Loop

A C++ program using a while loop to repeatedly read user input until a sentinel value of 00 is entered.

19
New cards
<p>Menu-Driven Do-While Loop</p>

Menu-Driven Do-While Loop

A C++ program using a do-while loop to display menu options at least once and continue execution until choice 22 (Exit) is selected.