Module 2: Review of Pointers Flashcards
is the memory address of a variable
Pointer →
Pointer variable →content is a
memory address
is called the address of
operator
ampersand, &,
X is a unary operator that
returns the address of its operand
address of operator
When used as a unary operator, * is the
X operator or Y operator
dereferencing
indirection
Refers to object to which its operand points
dereferencing operator *
X creates a new dynamic variable of a
specified type and returns a pointer that points to this new
variable.
new operator
It is a special area of memory that is reserved for
dynamically allocated variables.
heap
Any new dynamic variable created by a program
consumes some of the memory in the
freestore/heap
If there was insufficient available memory to create
the new variable, then new returned a special value
named
NULL.
• Eliminates a dynamic variable and returns the memory that
the dynamic variable occupied to the freestore manager so
that the memory can be reused.
delete
If pointer variable pointing to the dynamic variable that was
destroyed and becomes undefined is called
dangling
pointers.
You can assign a name definition and then use the
type name to declare variables using X
typedef
keyword.
Is an array whose size is not specified when you write
the program, but is determined while the program is
running
dynamic arrays (dynamically-allocated arrays)