Module 3: Derived Data Types - Pointers, Arrays, and Functions

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

1/22

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering pointers, pointer arithmetic, one-dimensional and multidimensional arrays, arrays of pointers, functions, parameter passing mechanisms, recursion, and function pointers based on Module 3 of Computational Thinking and Programming in C.

23 Terms

1
New cards

Pointer

A variable that stores the memory address of another variable rather than a direct data value.

2
New cards

Address-of Operator (&)

A unary operator placed before a variable name to return its memory address.

3
New cards

Dereference Operator (*)

Also called the indirection operator, it accesses or modifies the value stored at the memory address contained within a pointer.

4
New cards

NULL Pointer

A pointer that does not point to any valid object or memory location and should not be dereferenced, declared as int *p = NULL;.

5
New cards

Void Pointer (void *)

A generic pointer that can hold the address of an object of any data type, requiring explicit type conversion before it can be dereferenced.

6
New cards

Pointer to Pointer

A pointer variable declared with double asterisks (e.g., int **p) that stores the memory address of another pointer variable.

7
New cards

Pointer Arithmetic

Arithmetic operations on pointers (such as increment, decrement, addition, or subtraction) where address adjustments are scaled by the byte size of the pointed-to data type.

8
New cards

Array

A collection of elements of the same data type stored in contiguous memory locations.

9
New cards

Zero-Based Indexing

An indexing convention in C where array numbering begins at index 0 and terminates at index n - 1.

10
New cards

Partial Initialization

An array initialization technique where fewer values than the declared array size are specified, causing all remaining elements to be automatically initialized to zero.

11
New cards

Two-Dimensional Array

An array organized into rows and columns, declared with two dimension specifiers using the syntax data_type array_name[rows][columns];.

12
New cards

Array of Pointers

An array whose individual elements are pointer variables, declared using the syntax int *p[5];.

13
New cards

Pointer to an Array

A pointer that points to an entire array rather than to an individual element, declared using parentheses as int (*p)[5];.

14
New cards

Function

A self-contained block of statements designed to perform a particular task in a modular program.

15
New cards

Function Prototype

A function declaration that informs the compiler about the function name, parameter types, and return type prior to its definition.

16
New cards

Actual Parameters

The arguments, variables, or expressions passed to a function at the point of the function call.

17
New cards

Formal Parameters

The variables defined in the function header that receive values or addresses from actual arguments during a call.

18
New cards

Call by Value

A parameter passing technique where a copy of the actual argument is passed to the function, ensuring modifications inside the function do not affect the caller's original variable.

19
New cards

Pointer-Based Reference Behavior

A technique in C where the caller passes the address of a variable to a pointer parameter, allowing the function to modify the original variable via dereferencing.

20
New cards

Recursion

A programming process in which a function calls itself repeatedly to solve smaller instances of a problem.

21
New cards

Base Case

The terminating condition in a recursive function that directly returns a value without making further recursive calls, preventing infinite recursion.

22
New cards

Recursive Case

The branch of a recursive function where the function invokes itself with a smaller or simpler problem input.

23
New cards

Function Pointer

A pointer variable that stores the memory address of an executable function, declared with parentheses as return_type (*pointer_name)(parameter_types);.