← Back to archive

Stdle #55 · classes · 2026-07-31

What does this Go snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

package main
import "fmt"
type T struct{ N int }
func main() {
a := [2]T{{1}, {2}}
b := a
b[0].N = 99
fmt.Println(a[0].N, b[0].N)
}
Classes
4 attempts left

Answer & explanation