UNIT 4

40 flashcardsby Feven
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
Flow of control
The order in which statements are executed in a program
2
Flow control
Control of which instructions are executed in a program
3
Selection statements
Statements that allow programs to make decisions at runtime
4
Condition
A Boolean expression used in decision making
5
Boolean expression
An expression that evaluates to true or false
6
If statement
A statement that executes a block of code if a condition is true
7
If-else statement
A statement that executes one block if true and another if false
8
Else-if statement
A statement that tests multiple conditions
9
Nested if statement
An if statement inside another if statement
10
Switch statement
A control flow statement that executes code based on a variable value
11
Break statement
A statement that terminates execution of a loop or switch
12
Default case
A case executed when no match is found in switch
13
Loop
A statement used when an action must be repeated
14
Loop body
The statement or group of statements repeated in a loop
15
Iteration
Each repetition of the loop body
16
For loop
A repetition statement with initialization, condition, and increment/decrement
17
While loop
A repetition statement that executes while a condition is true
18
Do-while loop
A repetition statement that executes the body first, then checks condition
19
Counter-controlled iteration
Iteration using a counter to control the number of repetitions
20
Sentinel-controlled iteration
Iteration controlled by a sentinel value
21
Sentinel value
A value used to indicate the end of input
22
Input validation
Checking input values to ensure they are correct
23
Infinite loop
A loop whose condition never becomes false
24
Control variable
A variable used to control the number of loop iterations
25
Condition
An expression evaluated as true or false
26
True value
Any non-zero value
27
False value
Zero value
28
Program control constructs
Statements that determine the flow of execution in a program
29
Sequential flow
Statements executed one after another in order
30
Multi-way branch statement
A statement that compares a variable to multiple values
31
Loop
A statement used when an action must be repeated
32
Iteration
Each repetition of the loop body
33
Loop body
The statement or group of statements repeated in a loop
34
Definite iteration
Iteration where the number of repetitions is known before execution
35
Indefinite iteration
Iteration where the number of repetitions is not known before execution
36
Loop-continuation condition
The Boolean expression that controls loop execution
37
Break statement
A statement that causes immediate exit from a loop or switch
38
Continue statement
A statement that skips remaining statements and continues with next iteration
39
Input validation
Testing input to ensure it is within a valid range
40
Range checking
Ensuring input values fall within a specified range
Study all 40 cards for free