Control Structure Flashcards
A sequential structure executes a sequence of statements in order. A statement that is used to control the flow of a program.
Control Structure
The program executes particular statements depending on the given condition.
Selection Structure
The program repeats particular statements a certain number of times, depending on the given condition.
Repetition Structure
Are incorporated using the if statement.
One-way Selections
Are used to choose between two alternatives.
Two-way Selections
Is a reserved word, which executes when the given expression of if statement evaluates to false.
else
These are any kind of statements grouped together within curly braces.
Compound Statements
When one control statement, either selection or repetition, is located within another, it is used to be _.
nested
A statement that allows a program to perform multiple selections.
nested if
Is a process in which the computer evaluates a logical expression from left to right and stops as soon as the value of the expression is determined.
Short-Circuit Evaluation
A statement that allows a single variable to be tested for equality against a list of values, and, depending on its value, executes compound statements.
Switch statement
Structures that are used to execute a block of statements repeatedly.
Looping
Repeats a block statements while a given condition evaluates to true. It evaluates the condition before executing the loop body.
while loop
A loop that continues to execute endlessly
Infinite loop
Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.
for loop