🐹

Go (Golang) MCQ

Test your Go (Golang) knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.

100 Questions 40 Beginner 40 Intermediate 20 Advanced
1

What is the Go scheduler?

2

What is the difference between buffered and unbuffered channels?

3

What is the errors.Is() function?

4

What is a sync.Mutex used for?

5

What is a sync.RWMutex?

6

What is an error wrapping in Go 1.13+?

7

What is sync.Once used for?

8

What is a sync.Pool?

9

What is the Go garbage collector's concurrency model?

10

What is the difference between a nil slice and an empty slice?

11

What does GOMAXPROCS control?

12

What is a closure in Go?

13

What is the difference between copy() and assignment for slices?

14

What is a goroutine leak?

15

What is the go vet tool?

16

What is the context package's cancellation propagation?

17

What is escape analysis in Go?

18

What is atomic operations used for in Go?

19

What is a goroutine's stack behavior in Go?

20

What is the error interface in Go?

21

What is a sentinel error in Go?

22

What is the context.WithTimeout vs context.WithDeadline difference?

23

What does go build -race do?

24

What is a Go module proxy?

25

What is the difference between value and pointer method sets for interface satisfaction?

26

What does go generate do?

27

What is a build tag/constraint in Go?

28

What is the purpose of the io.Reader and io.Writer interfaces?

29

What is a functional option pattern in Go?

30

What is the go vet tool specifically checking for with printf verbs?

31

What is the difference between make(chan T) and make(chan T, 1)?

32

What is table-driven testing in Go?

33

What does http.Handler vs http.HandlerFunc distinguish?

34

What is the time.Ticker vs time.Timer difference?

35

What is the net/http server's concurrency model?

36

What is the stringer tool and its use in Go?

37

What is golang.org/x/sync/errgroup?

38

What is the difference between new(T) and &T{}?

39

What is the Go workspace mode (go.work)?

40

What is the difference between panic and log.Fatal in Go?