15 Standard Library & Idioms questions from the Go bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
B.the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
C.the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
D.the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
Answer + AI explanation with Pro
2. Which term means: "the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order"?
Junior
A.defer
B.sync.Mutex
C.slices package
D.context.Context
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.defer — the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
B.defer — the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
C.defer — the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
D.defer — the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
Answer + AI explanation with Pro
4. What is context.Context?
Mid
A.the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
B.the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access
C.the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
D.the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
Answer + AI explanation with Pro
5. Which term means: "the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries"?
Mid
A.defer
B.context.Context
C.sync.Mutex
D.sync.Once
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.context.Context — the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
B.context.Context — the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
C.context.Context — the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
D.context.Context — the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
Answer + AI explanation with Pro
7. What is sync.Mutex?
Mid
A.the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access
B.the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
C.the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
D.the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
Answer + AI explanation with Pro
8. Which term means: "the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access"?
Mid
A.context.Context
B.sync.Mutex
C.slices package
D.defer
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.sync.Mutex — the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
B.sync.Mutex — the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
C.sync.Mutex — the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access
D.sync.Mutex — the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
Answer + AI explanation with Pro
10. What is sync.Once?
Mid
A.the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
B.the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access
C.the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
D.the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
Answer + AI explanation with Pro
11. Which term means: "the synchronization helper guaranteeing a given function runs exactly one time across all goroutines"?
Mid
A.context.Context
B.sync.Once
C.sync.Mutex
D.slices package
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.sync.Once — the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
B.sync.Once — the mutual-exclusion lock whose Lock and Unlock methods guard a critical section against concurrent access
C.sync.Once — the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
D.sync.Once — the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
Answer + AI explanation with Pro
13. What is slices package?
Senior
A.the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
B.the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
C.the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
D.the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
Answer + AI explanation with Pro
14. Which term means: "the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index"?
Senior
A.slices package
B.context.Context
C.defer
D.sync.Mutex
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.slices package — the standard carrier of deadlines, cancellation signals and request-scoped values across API boundaries
B.slices package — the generic standard library collection added in 1.21 providing helpers like Sort, Contains and Index
C.slices package — the synchronization helper guaranteeing a given function runs exactly one time across all goroutines
D.slices package — the statement that schedules a function call to run when the surrounding function returns, in last-in-first-out order
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Standard Library & Idioms question come with Pro.