← Back to archive

Stdle #173 · classes · 2026-11-26

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() {
orig := T{N: 3}
copy := orig
copy.N++
fmt.Println(orig.N, copy.N)
}
Classes
4 attempts left

Answer & explanation