1/27
Vocabulary flashcards covering C/C++ memory segments, variable declarations, primitive types, alignment rules, and console I/O stream mechanisms.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Static RAM
The segment of memory that exists for the entire lifetime of the program and whose total size requirement is calculated at compile time.
Stack RAM
The segment of memory where local variables, parameters, and function call stack frames are allocated and managed based on program scope.
Heap RAM
The segment of memory used for dynamic allocation that starts with an initial allocation from the memory manager and grows as needed during execution.
Global Scope
A scope for variables accessible throughout the entire program; generally discouraged because it creates tight coupling, invites variable overshadowing, and propagates errors.
Local Scope
The scope created as part of a function, placing local variables and parameters inside a stack frame allocated in stack memory.
Block Scope
A subscope created inside control flow structures like for loops or if statements where variables exist only within that specific block and typically overshadow outer variables.
Uninitialized Variable (C/C++)
A declared variable given no initial value that retains whatever leftover bits or arbitrary data happen to be residing in that memory location.
C Basic Data Types
The five primitive data types supported in standard C: character (1 byte), integer (typically 4 bytes), float (typically 4 bytes), double (8 bytes), and void (valueless).
C-Style String
A semantic array of characters that explicitly terminates with a null character (\0) rather than existing as a primitive data type.
Null Character (\0)
A sentinel character that marks the end of a C-style string, requiring string character arrays to be allocated with at least one extra byte of space.
Truthiness in C
The evaluation of truth values in C where exactly 0 represents false and any non-zero value is treated as true.
Data Alignment / Addressing Rules
The hardware requirement where data types must be aligned in memory at address multiples matching their byte size (e.g., 8-byte doubles on multiples of 8, 4-byte ints on multiples of 4).
Short Modifier
A type qualifier that reduces the size of a standard integer from 4 bytes to 2 bytes.
Long Modifier
A type qualifier that increases the size of a standard integer from 4 bytes to 8 bytes.
Unsigned Modifier
A type modifier that forces an integral type to represent only non-negative values rather than the language default of signed values.
Ampersand Prefix Operator (&)
An operator prefixed to a variable meaning 'address of' or 'reference to', used to pass a variable's memory address to functions like scanf.
Pass by Pointer
A technique in C where a pointer holding the target address is passed by value, enabling the receiving function to dereference that address and alter the original memory.
iostream
The standard C++ header library that provides classes and operators for object-oriented console input and output streams.
Scope Resolution Operator (::)
The double-colon operator used in C++ to explicitly specify and access members belonging to a particular namespace, such as std::cout.
Insertion Operator (<<)
The double less-than operator used with output streams like cout to push data and variables into the stream buffer.
endl
A C++ stream manipulator that inserts a newline character into the output stream and immediately forces the stream to flush its buffer.
iomanip
The C++ header library containing formatting manipulators like setw and setprecision to format stream output similarly to printf.
setw
A stream manipulator from iomanip that establishes the minimum field width for only the immediately following item inserted into the output stream.
Extraction Operator (>>)
The double greater-than operator used with cin to parse input characters from standard input into a variable using whitespace delimiters.
cin.clear()
A member function on cin that resets error state flags (such as the fail flag) so the input stream can resume accepting input.
cin.ignore()
A member function on cin used to discard a specified number of characters from the input stream or skip characters until a designated delimiter character is reached.
cin.get()
A member function on cin that reads and extracts a single character from the input stream, including whitespace characters.
Double Pointer
A pointer variable that stores the memory address of another pointer, utilized in C functions like getline to allow dynamic memory allocation across function boundaries.