Traits interview questions

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.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Trait?

Junior
  1. A.a named collection of method signatures defining shared behavior that types can implement
  2. 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
  3. C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  4. 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
  1. A.Trait bound
  2. B.Trait
  3. C.Trait object
  4. D.Default method

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. 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
  2. B.Trait — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  3. C.Trait — a named collection of method signatures defining shared behavior that types can implement
  4. 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
  1. 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
  2. B.a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
  3. C.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  4. 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
  1. A.Trait bound
  2. B.impl Trait
  3. C.Trait
  4. D.Default method

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.Trait bound — a body provided inside a trait definition that implementors inherit unless they choose to override it
  2. B.Trait bound — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
  3. 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
  4. 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
  1. A.a named collection of method signatures defining shared behavior that types can implement
  2. B.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  3. C.a body provided inside a trait definition that implementors inherit unless they choose to override it
  4. 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
  1. A.Trait object
  2. B.Trait bound
  3. C.impl Trait
  4. D.Default method

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.Default method — a named collection of method signatures defining shared behavior that types can implement
  2. B.Default method — a body provided inside a trait definition that implementors inherit unless they choose to override it
  3. 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
  4. 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
  1. A.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  2. B.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  3. C.a body provided inside a trait definition that implementors inherit unless they choose to override it
  4. 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
  1. A.Default method
  2. B.Trait object
  3. C.Orphan rule
  4. D.Trait

Answer + AI explanation with Pro

12. Which statement is correct?

Senior
  1. A.Trait object — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
  2. B.Trait object — a body provided inside a trait definition that implementors inherit unless they choose to override it
  3. 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
  4. 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
  1. A.a named collection of method signatures defining shared behavior that types can implement
  2. B.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  3. C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  4. 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
  1. A.Trait bound
  2. B.impl Trait
  3. C.Default method
  4. D.Trait

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.impl Trait — the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  2. B.impl Trait — a body provided inside a trait definition that implementors inherit unless they choose to override it
  3. C.impl Trait — a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  4. 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
  1. A.a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  2. B.a named collection of method signatures defining shared behavior that types can implement
  3. C.the coherence restriction forbidding an implementation unless either the trait or the type is local to the current crate
  4. 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
  1. A.Orphan rule
  2. B.Trait object
  3. C.impl Trait
  4. D.Trait bound

Answer + AI explanation with Pro

18. Which statement is correct?

Senior
  1. A.Orphan rule — a constraint on a generic parameter requiring it to implement specified behavior before the code will compile
  2. B.Orphan rule — a syntax in argument or return position denoting some single concrete type implementing the given behavior, resolved statically without a vtable
  3. C.Orphan rule — a body provided inside a trait definition that implementors inherit unless they choose to override it
  4. 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.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers