GO 1.22+ · 15 QUESTIONS · ABOUT 10 MINUTES

Simple language. Surprising slices.

Go is famously small, but its slices, defer rules and nil interfaces still catch experienced developers. Fifteen snippets, each explained, with your result broken down by topic. No sign-up, nothing saved.

Start the Go test
for i := 0; i < 3; i++ {  defer fmt.Print(i)}
output210
QUESTION 1 / 15 · BASICSEasy

What does this print?

var x intvar s stringfmt.Printf("%d %q", x, s)

What this Go test measures, in short

This test checks whether you can predict what real Go code does: zero values, how slices share memory, when defer runs, how channels block, and why a nil pointer inside an interface isn't nil. It rewards knowing the runtime rules, not memorising the standard library.

All snippets assume Go 1.22 or later, inside func main with fmt imported. The questions are our own and not standardised against a population, so treat the result as a check on your knowledge, not a certification.

By What's Your IQ · Reviewed 4 Oct 2026
Format
15 predict-the-output questions, 4 options each
Topics
Basics, slices and maps, functions and defer, concurrency, interfaces
Version
Go 1.22+ (per-iteration loop variables)
Language
Designed at Google by Griesemer, Pike and Thompson; open-sourced 2009
QUESTION 4, STEP BY STEP

A slice is a window onto an array

Each slice is a small header: a pointer, a length and a capacity. Two slices can look at the same array, until append runs out of room and quietly copies to a new one.

ARRAY 1
102132
alen 3 · cap 3 → arr1
a is a header pointing to a new array of 3 ints, with length 3 and capacity 3.
WRITING IT THE GO WAY

Works, but not how Go people write it

FRAGILE
result, _ := strconv.Atoi(input)use(result)
IDIOMATIC
n, err := strconv.Atoi(input)if err != nil {	return fmt.Errorf("parse %q: %w", input, err)}use(n)

Go has no exceptions. Ignoring err with _ hides failures; wrapping with %w adds context and keeps the original error checkable with errors.Is.

Docker, Kubernetes, Terraformare all written in GoFast compiles, single-binary deploys and built-in concurrency made Go the default language of cloud infrastructure.
2007 → 2009Born of slow builds. Robert Griesemer, Rob Pike and Ken Thompson started Go at Google, frustrated by long C++ compile times. It was open-sourced in November 2009.1
2012The Go 1 promise. Go 1.0 came with a compatibility guarantee: code written for it should keep compiling on every later 1.x release.2
2022 · 1.18Generics arrive. After a decade of debate, type parameters landed, the biggest language change since 1.0.3
2024 · 1.22Loop variables fixed. Each loop iteration now gets its own variable, ending the most common closure bug, the one in question 15.4
  1. Pike, R. (2012). Go at Google: Language design in the service of software engineering.
  2. The Go Authors. Go 1 and the future of Go programs.
  3. The Go Authors. (2022). Go 1.18 release notes.
  4. The Go Authors. (2024). Go 1.22 release notes.

Where to go next

Knowing Go is one thing. How do you reason?

Our full IQ test measures the logic and working memory that concurrent code demands: 60 questions across four domains, about 30 minutes.

Take the full IQ test