They are both correct. A pointer holds an address in memory. If you outputted the value of a pointer, you would get a memory address, which pretty much would look like random garble. However, you can
use a pointer to change the value of a variable as well. By using the correct command, you basically say change the value of the
address a pointer is pointing to. For instance, lets say pointer i points to variable x, and variable x's location in memory is 1234:5678. Lets say x is initially 10. If you wanted to change x's value to 20, you could do so using the pointer like so:
What that code does is it says, go to the address that i is holding, which also happens to be variable x's location, and change the value that address i is holding to 20, which therefore also changes x's value.