Types & Structs interview questions

15 real Types & Structs questions from the Rust bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Types & Structs free