A pointer is a variable that stores a memory address in it
Memory locations are typically addressed using Hexadecimal
Pointer declaration syntax
Example:
As is the case with most other variables when you don’t initialize a pointer it is given a random value which in this case would be a random address in memory that could be pointing to something important so you would typically initialize a pointer to NULL
In order to get the memory address for a specific variable you would need to use the reference operator (&)
In order to get the data stored in a memory address you would need to use the dereference operator (*)
You can use the dereference operator to manipulate the data at the end of the pointer