A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-17.go
1packagemain
2
3import"fmt"
4
5typeSstruct{
6Nint
7Tstring
8}
9
10funcmain(){
11varsS
12fmt.Printf("%d %q\n",s.N,s.T)
13}
Classes
Answer & explanation
Console output
0 ""
Why
Declaring var s S gives s the struct’s zero value, where every field takes its own type’s zero value. N becomes 0 and T becomes the empty string. The zero-value struct is immediately usable without any constructor; %q renders the empty string as "".