Fundamentals of Programming - Vocabulary Flashcards

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/40

flashcard set

Earn XP

Description and Tags

Flashcards covering vocabulary related to repetition structures, loop phases, increment/decrement operators, types of looping, while loops, for loops, do-while loops, nested loops, functions, arrays, strings, and related concepts in C programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

41 Terms

1
New cards

Repetition

Execution of the same block of code in a program repeatedly.

2
New cards

Initialization (in loops)

The starting value assigned to a variable that determines the loop's initial value.

3
New cards

Condition (in loops)

Specifies how many times the set of instructions in a loop will be executed and when the repetitions stop, often using logical expressions.

4
New cards

Loop Body

Statements and actions that you want the program to repeat, enclosed in open and close brackets.

5
New cards

Counter (in loops)

The number of times an action is repeated in a loop, can be incremented or decremented.

6
New cards

Increment and Decrement Operators

Operators that modify the value of a variable by increasing or decreasing it by 1.

7
New cards

Pre-increment

The variable is incremented first, then used in the expression.

8
New cards

Post-increment

The current value of the variable is used first, then it is incremented.

9
New cards

Pre-decrement

The variable is decremented first, then used in the expression.

10
New cards

Post-decrement

The current value of the variable is used first, then it is decremented.

11
New cards

FOR loop

A loop best used when the number of iterations is already known.

12
New cards

WHILE loop

A loop best used when the number of iterations is unknown and checks the condition before executing the block of code.

13
New cards

DO-WHILE loop

A loop that functions the same as the while loop, but the condition is checked after the body of the loop has been executed, ensuring it runs at least once even if the condition is initially false.

14
New cards

WHILE Loop

A repetition control structure that repeatedly executes statements as long as the specified condition remains true.

15
New cards

FOR Loop

A repetition control structure that repeatedly executes statements as long as the specified condition remains true, with initialization, condition, and increment/decrement steps.

16
New cards

DO-WHILE Loop

A loop where the condition is checked after the loop body runs, ensuring the code inside is executed at least once.

17
New cards

Break Statement

Used to immediately terminate a loop, preventing any further iterations.

18
New cards

Continue Statement

Skips the current iteration and moves to the next cycle of the loop.

19
New cards

Nested Loops

A loop inside another loop; the inner loop executes its entire sequence of steps for each iteration of the outer loop.

20
New cards

Modularization in C

Breaking a program into smaller, manageable sections called functions, each handling a specific task.

21
New cards

Built-in Functions

Pre-built functions available in C, accessed through header files, that perform common tasks.

22
New cards

User-Defined Functions

Custom functions created by the programmer to perform specific tasks tailored to the program’s requirements.

23
New cards

Void Functions

Functions that do not return any value; they are typically used for performing actions like displaying output or modifying global variables.

24
New cards

Local Variables

Variables declared within a specific function, accessible only within that function.

25
New cards

Global Variables

Variables declared outside any function, making them accessible and modifiable by all functions in the program.

26
New cards

Static Variables

Variables that are initialized only once and retain their value for the duration of the program, but are only accessible within the function or file where they are declared.

27
New cards

Pass by Value

A method where a copy of the actual value is passed to a function, ensuring that modifications inside the function do not affect the original variable.

28
New cards

Recursion

A function calls itself, either directly or indirectly. It’s solves a problem by breaking it down into smaller subproblems of the same type.

29
New cards

Base Case (Recursion)

Acts as a termination condition for a recursive function to prevent infinite recursion.

30
New cards

Recursive Case

A condition under which a function continues to call itself, allowing the recursion process to proceed.

31
New cards

Arrays

Data structures that stores elements of the same data type in contiguous memory locations which are accessed by an index number.

32
New cards

One-Dimensional Array

The simplest type of array, where elements are stored in a linear order.

33
New cards

Two-Dimensional Array

An array that has exactly two dimensions. They can be visualized in the form of rows and columns organized in a two-dimensional plane.

34
New cards

String

In C programming, strings are arrays of characters terminated by a special character called the null terminator (‘\0’), which signals the end of the string.

35
New cards

strcpy()

Copies string s2 into the destination string s1, including the terminating null character. After copying, sl will be identical to s2.

36
New cards

strncpy()

Copies at most n characters of string s2 into destination s1. If s2 is shorter than n, the remaining space is filled with null characters ('\0'). If s2 is longer or equal to n, destination string will not automatically be null-terminated.

37
New cards

strcat()

Appends (concatenates) the string s2 to the array s1. The initial character of s2 replaces the terminating null character of s1. The destination array s1 must be sufficiently sized to accommodate both the original content and the appended string, including the null terminator.

38
New cards

strncat()

Appends at most n characters of string s2 to array s1. The first character of s2 overwrites the terminating null character of s1. The value of s1 is returned.

39
New cards

strlen()

Determines the length of string s pointed by s. This function counts characters until the null character is found.

40
New cards

strncmp()

Compares up to n characters of the string s1 with the string s2. The function returns 0, less than 0, or greater than 0, if s1 is equal to, less than, or greater than s2, respectively.

41
New cards

strcmp()

Compares the string s1 with the string s2. The function returns 0, less than 0, or greater than 0 if s1 is equal to, less than, or greater than s2, respectively.