Declare Go pointers with `*`, get addresses with `&`, and dereference values with `*` to modify variables directly.
Declare a pointer variable using the * symbol before the type, assign it the address of a variable using &, and access the value it points to using *.
package main
import "fmt"
func main() {
x := 42
var ptr *int = &x
fmt.Println(*ptr) // 42
*ptr = 100
fmt.Println(x) // 100
}
A pointer is a variable that holds the memory address of another variable instead of the value itself. Think of it like a house address on a map; the address isn't the house, but it tells you exactly where to find it. You use pointers when you need to modify a variable inside a function or pass large data structures efficiently without copying them.