You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
211 B
Bash
9 lines
211 B
Bash
5 years ago
|
# `zeroval` doesn't change the `i` in `main`, but
|
||
|
# `zeroptr` does because it has a reference to
|
||
|
# the memory address for that variable.
|
||
|
$ go run pointers.go
|
||
|
initial: 1
|
||
|
zeroval: 1
|
||
|
zeroptr: 0
|
||
|
pointer: 0x42131100
|