18 Generics & Closures questions from the Rust 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.an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
B.a function parameterized over one or more type placeholders so it works for many concrete types
C.the closure trait for callables that consume captured values and can therefore be invoked at most one time
D.the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
Answer + AI explanation with Pro
2. Which term means: "a function parameterized over one or more type placeholders so it works for many concrete types"?
Junior
A.Monomorphization
B.Generic function
C.move closure
D.Closure
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Generic function — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
B.Generic function — the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.Generic function — an anonymous function that can capture variables from the surrounding scope
D.Generic function — a function parameterized over one or more type placeholders so it works for many concrete types
Answer + AI explanation with Pro
4. What is Monomorphization?
Senior
A.an anonymous function that can capture variables from the surrounding scope
B.the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
D.the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
Answer + AI explanation with Pro
5. Which term means: "the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction"?
Senior
A.Closure
B.FnOnce
C.Monomorphization
D.move closure
Answer + AI explanation with Pro
6. Which statement is correct?
Senior
A.Monomorphization — the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
B.Monomorphization — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
C.Monomorphization — an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
D.Monomorphization — the closure trait for callables that consume captured values and can therefore be invoked at most one time
Answer + AI explanation with Pro
7. What is Closure?
Junior
A.an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
B.the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.an anonymous function that can capture variables from the surrounding scope
D.the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
Answer + AI explanation with Pro
8. Which term means: "an anonymous function that can capture variables from the surrounding scope"?
Junior
A.Closure
B.Generic function
C.FnOnce
D.FnMut
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.Closure — a function parameterized over one or more type placeholders so it works for many concrete types
B.Closure — an anonymous function that can capture variables from the surrounding scope
C.Closure — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
D.Closure — an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
Answer + AI explanation with Pro
10. What is FnOnce?
Mid
A.the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
B.the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
D.an anonymous function that can capture variables from the surrounding scope
Answer + AI explanation with Pro
11. Which term means: "the closure trait for callables that consume captured values and can therefore be invoked at most one time"?
Mid
A.Closure
B.FnOnce
C.move closure
D.Generic function
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.FnOnce — a function parameterized over one or more type placeholders so it works for many concrete types
B.FnOnce — the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.FnOnce — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
D.FnOnce — an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
Answer + AI explanation with Pro
13. What is FnMut?
Mid
A.the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
B.an anonymous function that can capture variables from the surrounding scope
C.the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
D.the closure trait for callables that consume captured values and can therefore be invoked at most one time
Answer + AI explanation with Pro
14. Which term means: "the closure trait for callables that mutably borrow their captures and may be invoked repeatedly"?
Mid
A.Closure
B.Monomorphization
C.FnMut
D.Generic function
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.FnMut — the closure trait for callables that consume captured values and can therefore be invoked at most one time
B.FnMut — the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
C.FnMut — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
D.FnMut — an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
Answer + AI explanation with Pro
16. What is move closure?
Mid
A.an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
B.the closure trait for callables that consume captured values and can therefore be invoked at most one time
C.a function parameterized over one or more type placeholders so it works for many concrete types
D.the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
Answer + AI explanation with Pro
17. Which term means: "an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread"?
Mid
A.FnMut
B.Generic function
C.move closure
D.FnOnce
Answer + AI explanation with Pro
18. Which statement is correct?
Mid
A.move closure — the compile-time process of generating a specialized copy of generic code for each concrete type used, yielding zero-cost abstraction
B.move closure — an anonymous function forced by a keyword to take ownership of its captured variables, commonly required when passing work to a thread
C.move closure — an anonymous function that can capture variables from the surrounding scope
D.move closure — the closure trait for callables that mutably borrow their captures and may be invoked repeatedly
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 Generics & Closures question come with Pro.