Go theorytheory 0/50 · 0%
Memory · easy

11. Pointers

References without pointer arithmetic.

`&x` takes an address and `*p` dereferences. Go has no pointer arithmetic, and escape analysis decides stack or heap placement automatically. Pass pointers to mutate or to avoid copying large structs; nil dereference panics at runtime.

Check your understanding

  1. 1. Does Go allow pointer arithmetic?

  2. 2. What decides heap allocation?