Control Structures and Recursion in C

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/22

flashcard set

Earn XP

Description and Tags

Flashcards covering decision statements, loop structures, jumping statements, recursion concepts, and stack memory management in C programming.

Last updated 5:29 AM on 8/11/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

Decision Statements

Statements used to make decisions in a program based on conditions, where a block of code is executed depending on whether the condition is true or false.

2
New cards

if STATEMENT

A control structure that executes a block of code if the condition is true.

3
New cards

if-else STATEMENT

A decision statement that executes one block of code if the condition is true and another if it is false.

4
New cards

else-if ladder

A control structure used to check multiple conditions one by one.

5
New cards

switch STATEMENT

A control structure that selects one block of code from many options based on an expression; it is efficient when the same variable is compared with many values.

6
New cards

Fall-through

The execution of the next case in a switch statement; prevented by using the break statement.

7
New cards

for loop

An entry-controlled loop generally used when the number of iterations is known in advance; initialization is executed only once, followed by the condition check and update.

8
New cards

while loop

An entry-controlled loop used to execute statements repeatedly as long as a given condition is true; typically used when the number of iterations is not known in advance.

9
New cards

do-while loop

An exit-controlled loop that executes a block of statements at least once, then repeats as long as the condition is true.

10
New cards

Jumping Statements

Statements used to transfer the control from one part of the program to another, including break, continue, goto, return, and exit().exit().

11
New cards

break

A jumping statement that terminates a loop or switch statement and moves control to the statement immediately following it.

12
New cards

continue

A jumping statement that skips the remaining statements in the loop for the current iteration and moves control to the next iteration.

13
New cards

goto

A jumping statement that transfers control to a labeled statement within the same function.

14
New cards

return

A jumping statement that terminates a function immediately, returning control and potentially a value to the calling function.

15
New cards

exit()

A function defined in <stdlib.h><stdlib.h> that terminates the program immediately.

16
New cards

exit(0)

A specific call to the exit()exit() function representing normal termination of a program.

17
New cards

exit(1)

A specific call to the exit()exit() function representing abnormal termination of a program.

18
New cards

Recursion

A programming technique in which a function calls itself directly or indirectly until a certain condition is met to solve a problem by breaking it into smaller subproblems.

19
New cards

Base Case

The stopping condition in recursion under which the function stop calling itself.

20
New cards

Recursive Case

The part of a recursive function where it calls itself with a smaller or modified input.

21
New cards

Stack frame (activation record)

A record created and pushed onto the stack when a function is called, initialized with parameters, local variables, and a return address.

22
New cards

Stack overflow

A condition that may occur in recursion if a base case is missing or the recursion depth is too large, exceeding memory limits.

23
New cards

Return address

A stored value in the stack frame that allows control to return to the caller after a function finishes execution.