What is the value of `p` after this code runs?
package main
func main() {
p := new(int)
_ = p
}Read the full question →Every question is hand-checked, every answer comes with an explanation, and your progress builds into a clear picture of where you stand.
Every Go question shows its code before you answer, so you are reading real Go, not a description of it.
Once you attempt a question you get the reasoning, not just a tick. That matters most on Go, where goroutine leaks, channel and select semantics, nil interface versus nil pointer, escape analysis, context cancellation, and the garbage collector's pacing.
Progress is tracked per topic across the 60 Go topics, so revision points at the gaps instead of the whole list.
576 Go questions right now: 89 easy, 244 medium and 243 hard. That number is read straight from the question table when this page is built, so it is never a rounded marketing figure.
No. Every Go question, including its code snippet, its difficulty and its topic, is readable without signing in. You need a free account only to submit an answer, see which option is correct, and read the worked explanation. We keep it that way so the platform stays honest about what you actually got right.
Goroutine leaks, channel and select semantics, nil interface versus nil pointer, escape analysis, context cancellation, and the garbage collector's pacing.
60 distinct topics are tagged on the Go questions, including pprof basics, channel internals hchan sudog, errgroup and fan-out, table-driven tests, benchmarks, context cancel deadline values. The topic labels come from the questions themselves, so the list matches what you will actually be asked.
Yes. Reading is free and unlimited. A free account unlocks answering, explanations and progress tracking. Pro (₹199 per month) adds AI explanations and AI-graded guesstimates on top; it is not needed to practise Go MCQs.
Cloud infrastructure, platform teams, CLI tooling, and high-throughput API services.
These are 12 of the 576 Go questions in the library, pulled live from the question table. The snippet, the difficulty and the topic are all here. The answer options and the explanation are not. Those need a free account.
Goroutine leaks, channel and select semantics, nil interface versus nil pointer, escape analysis, context cancellation, and the garbage collector's pacing.
package main
func main() {
p := new(int)
_ = p
}Read the full question →for _, r := range "abc" {
fmt.Printf("%c ", r)
}
// output?Read the full question →package mypkg
var Total int
var count intRead the full question →var mu sync.RWMutex
var data = map[string]int{"x": 1}
func read() int {
mu.RLock()
v := data["x"]
mu.Unlock()
return v
}Read the full question →var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Done()
wg.Done()
}()
wg.Wait()
fmt.Println("done")Read the full question →var wg sync.WaitGroup
for i := 0; i < 5; i++ {
go func() {
wg.Add(1)
defer wg.Done()
work()
}()
}
wg.Wait()Read the full question →func Zeros[T any](n int) []T {
return make([]T, n)
}
func main() {
xs := Zeros(3)
_ = xs
}Read the full question →f, _ := os.Create("cpu.prof")
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()Read the full question →import _ "net/http/pprof"Read the full question →jobs := make(chan int, 100)
var wg sync.WaitGroup
for w := 0; w < 3; w++ {
wg.Add(1)
go func() {
defer wg.Done()
for j := range jobs {
process(j)
}
}()
}
for _, j := range work {
jobs <- j
}
close(jobs)
wg.Wait()Read the full question →t := reflect.TypeOf(s)
f := t.Field(0)
tag := f.Tag.Get("json")Read the full question →func newInt() *int {
x := 42
return &x
}Read the full question →We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the correct option and the worked explanation for every Go question stay behind a free account. Signing in is free and takes a few seconds.
Cloud infrastructure, platform teams, CLI tooling, and high-throughput API services.