pointers

Memory is a very important resource in a computer. Some languages allow you to directly access and manipulate memory. This is achieved using pointers. We can use a pointer to access a byte of memory. When a pointer contains the address of a variable, we say that it points to that variable. When we declare a variable, a contiguous block of bytes is reserved for its use.

There are 2 ways that we can create a pointer:

dataType* nameOfPointer

or

dataType *nameOfPointer

For example:

int *ptr

or

int* ptr