Types & Structs interview questions

15 Types & Structs 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 Struct?

Junior
  1. A.a section that attaches methods and associated functions to a particular type
  2. B.a custom type aggregating named fields into a single record
  3. C.a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.a named type whose fields are positional and unnamed, accessed by numeric index

Answer + AI explanation with Pro

2. Which term means: "a custom type aggregating named fields into a single record"?

Junior
  1. A.Enum
  2. B.Impl block
  3. C.Tuple struct
  4. D.Struct

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Struct — a named type whose fields are positional and unnamed, accessed by numeric index
  2. B.Struct — a section that attaches methods and associated functions to a particular type
  3. C.Struct — a custom type aggregating named fields into a single record
  4. D.Struct — a type defined as a fixed set of alternative variants, each of which may carry its own data

Answer + AI explanation with Pro

4. What is Tuple struct?

Junior
  1. A.a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new
  2. B.a custom type aggregating named fields into a single record
  3. C.a named type whose fields are positional and unnamed, accessed by numeric index
  4. D.a type defined as a fixed set of alternative variants, each of which may carry its own data

Answer + AI explanation with Pro

5. Which term means: "a named type whose fields are positional and unnamed, accessed by numeric index"?

Junior
  1. A.Tuple struct
  2. B.Enum
  3. C.Struct
  4. D.Impl block

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.Tuple struct — a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new
  2. B.Tuple struct — a named type whose fields are positional and unnamed, accessed by numeric index
  3. C.Tuple struct — a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.Tuple struct — a section that attaches methods and associated functions to a particular type

Answer + AI explanation with Pro

7. What is Enum?

Junior
  1. A.a custom type aggregating named fields into a single record
  2. B.a named type whose fields are positional and unnamed, accessed by numeric index
  3. C.a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.a section that attaches methods and associated functions to a particular type

Answer + AI explanation with Pro

8. Which term means: "a type defined as a fixed set of alternative variants, each of which may carry its own data"?

Junior
  1. A.Associated function
  2. B.Enum
  3. C.Tuple struct
  4. D.Impl block

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.Enum — a custom type aggregating named fields into a single record
  2. B.Enum — a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new
  3. C.Enum — a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.Enum — a section that attaches methods and associated functions to a particular type

Answer + AI explanation with Pro

10. What is Impl block?

Mid
  1. A.a section that attaches methods and associated functions to a particular type
  2. B.a custom type aggregating named fields into a single record
  3. C.a named type whose fields are positional and unnamed, accessed by numeric index
  4. D.a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new

Answer + AI explanation with Pro

11. Which term means: "a section that attaches methods and associated functions to a particular type"?

Mid
  1. A.Struct
  2. B.Enum
  3. C.Impl block
  4. D.Associated function

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.Impl block — a section that attaches methods and associated functions to a particular type
  2. B.Impl block — a named type whose fields are positional and unnamed, accessed by numeric index
  3. C.Impl block — a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.Impl block — a custom type aggregating named fields into a single record

Answer + AI explanation with Pro

13. What is Associated function?

Mid
  1. A.a named type whose fields are positional and unnamed, accessed by numeric index
  2. B.a section that attaches methods and associated functions to a particular type
  3. C.a type defined as a fixed set of alternative variants, each of which may carry its own data
  4. D.a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new

Answer + AI explanation with Pro

14. Which term means: "a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new"?

Mid
  1. A.Enum
  2. B.Tuple struct
  3. C.Impl block
  4. D.Associated function

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.Associated function — a type defined as a fixed set of alternative variants, each of which may carry its own data
  2. B.Associated function — a custom type aggregating named fields into a single record
  3. C.Associated function — a function namespaced to a type that takes no self receiver, commonly used as a constructor such as new
  4. D.Associated function — a section that attaches methods and associated functions to a particular type

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 Types & Structs 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