1/12
Comprehensive vocabulary flashcards covering C pointers, pointer initialization, dereferencing, pointer expressions, memory size dependencies, arrays, strings, and arrays of pointers.
Pointer
A derived data type and variable that stores the memory address of another variable as its value, pointing to a data type of the same type and declared using the asterisk (*) operator.
Reference Operator (&)
An operator in C, also known as the address-of operator, used to obtain the memory address of a variable.
Pointer Referencing
The process of initializing a declared pointer variable with the address of another variable using the address-of (&) operator.
Dereference Operator (*)
An operator that, when used outside of a variable declaration, retrieves or manipulates the actual value of the variable stored at the memory address to which the pointer points.
Size of a Pointer Variable
The memory size occupied by a pointer, which does not depend on the data type of the variable it points to, but depends entirely on the system architecture (for example, 8 bytes on a 64-bit architecture).
Pointer Expressions
Expressions formed using pointer variables in combination with various C operators, including arithmetic, relational, assignment, conditional, unary, and bitwise operators.
Pointer Division Spacing Rule
A syntax precaution requiring a blank space between the division operator (/) and the dereference operator (*) (e.g., *p1 / p2) to avoid unintentionally creating the multi-line comment token (/).
Array Name (in Pointer Context)
The identifier of an array, which acts as a pointer to the first element of that array (e.g., myNumbers evaluates to the address &myNumbers[0]).
Pointer Arithmetic (Arrays)
The method of incrementing or adding integer offsets to an array pointer (e.g., *(ptr + i)) to navigate sequentially through memory locations of the array elements.
Null Character (\0)
A terminating character marking the end of a character array string in C, commonly used as a loop termination condition when traversing a string using a pointer.
Array of Pointers
A homogeneous collection of indexed pointer variables that serve as references to multiple memory locations of a similar data type, declared with the syntax: pointer_type *array_name[array_size];.
Memory Inefficiency in 2D Character Arrays
The allocation of a fixed rectangular grid of bytes (such as 4×12=48 bytes) for storing strings of variable lengths, resulting in wasted, unused memory bytes.
Array of Character Pointers (char *arr[])
A structure used to store multiple strings of varying lengths efficiently by having each pointer hold the starting address of its specific string, eliminating unused byte padding.