`zeroptr` in contrast has an `*int` parameter, meaning that it takes an `int` pointer. The `*iptr` code in the function body then _dereferences_ the pointer from its memory address to the current value at that address. Assigning a value to a dereferenced pointer changes the value at the referenced a
(iptr *int)
| 22 | // Assigning a value to a dereferenced pointer changes the |
| 23 | // value at the referenced address. |
| 24 | func zeroptr(iptr *int) { |
| 25 | *iptr = 0 |
| 26 | } |
| 27 | |
| 28 | func main() { |
| 29 | i := 1 |