1/9
Flashcards based on programming concepts involving references and parameters, focusing on understanding errors, object lifetimes, and memory management.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Const Reference
A reference that does not allow modification of the object it refers to; it allows the reference to bind to a const object.
Pointer
A variable that stores the memory address of another variable.
Segmentation Fault
An error that occurs when a program tries to access a memory location that it's not allowed to.
Object Lifetime
The duration during which an object exists in memory, from its creation to its destruction.
Compilation Error
An error that occurs when the code is syntactically incorrect or when the compiler cannot process it due to type mismatches.
Pass by Reference
A method of passing arguments to a function where a reference to the actual parameter is passed, allowing the function to modify the parameter.
Dynamic Memory Allocation
The method of allocating memory at runtime using pointers, typically via operators like new or malloc.
Dereferencing
The process of accessing the value at the memory address pointed to by a pointer.
Object Initialization
The process of creating an object and assigning it initial values, typically through a constructor.
Assignment with Pointers vs References
With pointers, the memory address can change, while with references, once assigned, it cannot change to refer to another object.