Arrays Flashcards
is a series of elements of the same type
placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
Array
Declaring arrays:
type name [elements];
Initializing arrays
int foo [5] = { 16, 2, 77, 40, 12071 };
Accessing the values of an array
name[index]
Multidimensional arrays can be described as
arrays of arrays
is a special type of variable used to store an address.
Pointer
To declare a pointer, use this syntax:
type * pointerName
need to be of the same type as the
variable whose address they are storing.
Pointers
When creating pointers, where you put the space doesn’t matter.
True
To assign a value to a pointer (the value being an address in memory), use the
address of operator (&).