Loading…
december code / try / go
No account needed. Answer, see why, move on.
Problem
What does this Go program print?
package main import "fmt" type P struct{ X, Y int } func main() { fmt.Printf("%v %+v\n", P{1, 2}, P{1, 2}) }
{1 2} {X:1 Y:2}
{1 2} {1 2}
{X:1 Y:2} {X:1 Y:2}
{1 2} main.P{X:1, Y:2}
Nothing here is saved. Create a free account to keep your progress, take an assessment and get your readiness score.