typeover
curriculum

Curriculum Types & methods Pointers exercise 4 · fill-word

Pointers

Take the address of x to create the pointer. The blank is the single operator that goes before the variable name. This is the "take a pointer" half of the & / * pair. Exercise 5 will be the deref half.

TypeScript reference
Fill the blanks →

About this theme

&x takes the address of x. *p dereferences p. Pointers in Go are pointers — they're not garbage-collector-hostile, they don't do arithmetic (no p++), and they don't bite. They're the explicit version of "by reference" — TypeScript hides this behind "objects are references," Go makes it visible.