Getting the value stored at a memory address using a pointer