1/7
This set of vocabulary flashcards covers advanced C data structures including memory reallocation, multi-dimensional array management, structs, unions, and custom vector implementation.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
realloc
A function with the signature void∗realloc(void∗oldptr,unsignedintsize) that allocates new memory on the heap, copies data from the old pointer to the new memory, and then frees the old pointer; if oldptr is null, it behaves like malloc.
struct
A mechanism for packing multiple variables of different types into a single fixed-size block known at compile time, treating them as a single data structure rather than an object. Can use sizeof(struct MyStruct) to determine byte size.

Dot syntax
The syntax used to access member variables within a C struct instance, for example, x.a=5.

Arrow syntax
A shortcut in C that is equivalent to dereferencing a pointer and accessing a member variable of a struct at the same time.

Words
Blocks of bytes that processors use to access memory; structs are often padded to align with this system word size for efficiency.
A compiler directive used to change the alignment of data by adjusting the padding of internal struct members to n-byte boundaries.
Union
A data container that can store a single item of one or more possible types, with its total size determined by the size of its largest member.

typedef
A keyword that allows the creation of an alias for custom types, often used to refer to structs without the prefix keyword 'struct'.