C Control Statements Lecture Notes

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

1/19

flashcard set

Earn XP

Description and Tags

This set of flashcards covers vocabulary and key concepts from the lecture on C programming control statements, including conditional statements, loops, and jump statements.

Last updated 7:37 AM on 7/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

if Statement

A conditional statement that executes a block of code based on a condition; if the condition is true, the block is executed, otherwise it is skipped.

2
New cards

if-else Statement

A conditional statement used to execute the if block if the condition is true, otherwise the else block will be executed.

3
New cards

if-else if-else Statement

A control structure used to check multiple conditions in sequence, where each block is checked only if the previous conditions were false.

4
New cards

switch Statement

A control structure that allows the selection of one of many code blocks based on the evaluated value of an expression.

5
New cards

break Statement

A statement used to exit a loop prematurely, even if the loop's condition is still true, or to prevent fall through in a switch statement.

6
New cards

default case

An optional portion of a switch statement that executes if none of the case labels match the expression.

7
New cards

Fall through

A behavior in switch statements where execution continues to the next case because a break statement was omitted.

8
New cards

Nested conditional statements

The use of one or more conditional statements, such as if, else if, or else, inside the body of another conditional statement.

9
New cards

for loop

A loop used for repetitive execution when the number of iterations is known in advance, consisting of initialization, condition, and increment/decrement.

10
New cards

Initialization

The part of a for loop, executed only once at the beginning, used to set the starting value for loop control variables.

11
New cards

Condition

A Boolean expression evaluated before each loop iteration to determine if the loop should continue or terminate.

12
New cards

Increment/Decrement

The part of a for loop executed at the end of each iteration to modify the loop control variable toward the termination condition.

13
New cards

while loop

A control structure used for repetitive execution as long as a certain condition is true, typically used when the number of iterations is not known in advance.

14
New cards

Infinite Loop

A loop where the condition never becomes false, such as when a variable like ii is always 11, causing the program to never terminate.

15
New cards

do-while loop

A repetitive control structure that guarantees the code inside the loop is executed at least once because the condition is checked after the execution of the loop body.

16
New cards

Nested Loop

The use of one or more loops, such as for, while, or do-while, inside another loop, often used for multi-dimensional data structures like matrices.

17
New cards

continue Statement

A statement used to skip the current iteration of a loop and immediately proceed to the next iteration.

18
New cards

goto Statement

A statement used to transfer program control to a specific labeled statement within the same function, creating non-linear control flow.

19
New cards

Single-Line Statement Format

A concise format where control statements are written on a single line without enclosing the code block in curly braces {}, used for simple one-liner statements.

20
New cards

Multi-Line Statement Format

A format where control statements are enclosed within curly braces {} to group multiple statements, enhancing readability for complex logic.