go-tour/pointers.go
2020-02-04 21:44:36 -06:00

17 lines
177 B
Go

package main
import "fmt"
func main() {
i, j := 42, 2701
p := &i
fmt.Println(*p)
*p = 21
p = &j
fmt.Println(i)
*p = *p / 37
fmt.Println(j)
}