1/18
Vocabulary practice flashcards covering loop types, iteration concepts, and control statements in C++ programming.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Loop
A control structure in programming that allows a program to repeat a set of instructions repeatedly until a specific condition is satisfied.
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.
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.
Initialization (in For Loop)
The start point in a for loop that sets or declares the initial value of the loop control variable.
Condition (in For Loop)
The end point test in a loop that determines whether the loop continues executing or terminates.
Update (in For Loop)
The step change component in a for loop that modifies the loop variable after each iteration.
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.
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.
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.
Outer Loop
The enclosing loop in a nested loop structure, which controls major iterations such as rows in grid or pattern structures.
Inner Loop
The enclosed loop in a nested loop structure that runs through all its cycles during each single iteration of the outer loop.
Break Statement
A loop control statement that immediately exits from the loop entirely.
Continue Statement
A loop control statement that skips the current iteration and proceeds directly to the next iteration of the loop.

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

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

2D Matrix Traversal Code
A C++ code example demonstrating nested loops to iterate through rows and columns of a 2×3 matrix.

Factorial Calculation Loop
A C++ code example using a for loop from 1 to n to calculate factorial using multiplication accumulation.

Sentinel-Controlled While Loop
A C++ program using a while loop to repeatedly read user input until a sentinel value of 0 is entered.

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 2 (Exit) is selected.