18 Traits 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.a named collection of method signatures defining shared behavior that types can implement
B.a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
D.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
Answer + AI explanation with Pro
2. Which term means: "a named collection of method signatures defining shared behavior that types can implement"?
Junior
A.Trait bound
B.Trait
C.Trait object
D.Default method
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Trait — a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
B.Trait — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
C.Trait — a named collection of method signatures defining shared behavior that types can implement
D.Trait — a body provided inside a trait definition that implementors inherit unless they choose to override it
Answer + AI explanation with Pro
4. What is Trait bound?
Mid
A.a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
B.a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
C.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
D.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
Answer + AI explanation with Pro
5. Which term means: "a constraint on a generic parameter requiring it to implement specified behavior before the code will compile"?
Mid
A.Trait bound
B.impl Trait
C.Trait
D.Default method
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.Trait bound — a body provided inside a trait definition that implementors inherit unless they choose to override it
B.Trait bound — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
C.Trait bound — a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
D.Trait bound — a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
Answer + AI explanation with Pro
7. What is Default method?
Mid
A.a named collection of method signatures defining shared behavior that types can implement
B.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
C.a body provided inside a trait definition that implementors inherit unless they choose to override it
D.a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
Answer + AI explanation with Pro
8. Which term means: "a body provided inside a trait definition that implementors inherit unless they choose to override it"?
Mid
A.Trait object
B.Trait bound
C.impl Trait
D.Default method
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Default method — a named collection of method signatures defining shared behavior that types can implement
B.Default method — a body provided inside a trait definition that implementors inherit unless they choose to override it
C.Default method — a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
D.Default method — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
Answer + AI explanation with Pro
10. What is Trait object?
Senior
A.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
B.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
C.a body provided inside a trait definition that implementors inherit unless they choose to override it
D.a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
Answer + AI explanation with Pro
11. Which term means: "a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable"?
Senior
A.Default method
B.Trait object
C.Orphan rule
D.Trait
Answer + AI explanation with Pro
12. Which statement is correct?
Senior
A.Trait object — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
B.Trait object — a body provided inside a trait definition that implementors inherit unless they choose to override it
C.Trait object — a value behind a pointer annotated with dyn that enables dynamic dispatch over any type implementing the behavior, resolved at runtime via a vtable
D.Trait object — a named collection of method signatures defining shared behavior that types can implement
Answer + AI explanation with Pro
13. What is impl Trait?
Senior
A.a named collection of method signatures defining shared behavior that types can implement
B.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
D.a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
Answer + AI explanation with Pro
14. Which term means: "a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable"?
Senior
A.Trait bound
B.impl Trait
C.Default method
D.Trait
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.impl Trait — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
B.impl Trait — a body provided inside a trait definition that implementors inherit unless they choose to override it
C.impl Trait — a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
D.impl Trait — a named collection of method signatures defining shared behavior that types can implement
Answer + AI explanation with Pro
16. What is Orphan rule?
Senior
A.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
B.a named collection of method signatures defining shared behavior that types can implement
C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
D.a body provided inside a trait definition that implementors inherit unless they choose to override it
Answer + AI explanation with Pro
17. Which term means: "the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate"?
Senior
A.Orphan rule
B.Trait object
C.impl Trait
D.Trait bound
Answer + AI explanation with Pro
18. Which statement is correct?
Senior
A.Orphan rule — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
B.Orphan rule — a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
C.Orphan rule — a body provided inside a trait definition that implementors inherit unless they choose to override it
D.Orphan rule — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
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 Traits question come with Pro.