Value vs Reference Types interview questions

15 real Value vs Reference Types questions from the Swift 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.an optimization that defers duplicating backing storage until a shared instance is actually mutated
  2. B.a value type that is copied when assigned or passed, with each copy independent
  3. C.a function on a value type that is marked to allow it to modify the instance's own properties
  4. D.a reference type whose instances are shared, so multiple variables point to the same object
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Struct — a value type that is copied when assigned or passed, with each copy independent
  2. B.Struct — a function on a value type that is marked to allow it to modify the instance's own properties
  3. C.Struct — a reference type whose instances are shared, so multiple variables point to the same object
  4. D.Struct — an optimization that defers duplicating backing storage until a shared instance is actually mutated
Reveal the answer + AI explanation — free account

4. What is Class?

Junior
  1. A.a value type that is copied when assigned or passed, with each copy independent
  2. B.a function on a value type that is marked to allow it to modify the instance's own properties
  3. C.an optimization that defers duplicating backing storage until a shared instance is actually mutated
  4. D.a reference type whose instances are shared, so multiple variables point to the same object
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Class — a function on a value type that is marked to allow it to modify the instance's own properties
  2. B.Class — a reference type whose instances are shared, so multiple variables point to the same object
  3. C.Class — behavior where mutating one variable never affects another that was assigned from it
  4. D.Class — a value type that is copied when assigned or passed, with each copy independent
Reveal the answer + AI explanation — free account

7. What is Value semantics?

Mid
  1. A.behavior where mutating one variable never affects another that was assigned from it
  2. B.a value type that is copied when assigned or passed, with each copy independent
  3. C.an optimization that defers duplicating backing storage until a shared instance is actually mutated
  4. D.a reference type whose instances are shared, so multiple variables point to the same object
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Value semantics — a function on a value type that is marked to allow it to modify the instance's own properties
  2. B.Value semantics — an optimization that defers duplicating backing storage until a shared instance is actually mutated
  3. C.Value semantics — a value type that is copied when assigned or passed, with each copy independent
  4. D.Value semantics — behavior where mutating one variable never affects another that was assigned from it
Reveal the answer + AI explanation — free account

10. What is Copy-on-write?

Senior
  1. A.a function on a value type that is marked to allow it to modify the instance's own properties
  2. B.a reference type whose instances are shared, so multiple variables point to the same object
  3. C.an optimization that defers duplicating backing storage until a shared instance is actually mutated
  4. D.a value type that is copied when assigned or passed, with each copy independent
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Senior
  1. A.Copy-on-write — a function on a value type that is marked to allow it to modify the instance's own properties
  2. B.Copy-on-write — an optimization that defers duplicating backing storage until a shared instance is actually mutated
  3. C.Copy-on-write — a reference type whose instances are shared, so multiple variables point to the same object
  4. D.Copy-on-write — behavior where mutating one variable never affects another that was assigned from it
Reveal the answer + AI explanation — free account

13. What is Mutating method?

Mid
  1. A.behavior where mutating one variable never affects another that was assigned from it
  2. B.a reference type whose instances are shared, so multiple variables point to the same object
  3. C.a value type that is copied when assigned or passed, with each copy independent
  4. D.a function on a value type that is marked to allow it to modify the instance's own properties
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Mutating method — behavior where mutating one variable never affects another that was assigned from it
  2. B.Mutating method — a value type that is copied when assigned or passed, with each copy independent
  3. C.Mutating method — a reference type whose instances are shared, so multiple variables point to the same object
  4. D.Mutating method — a function on a value type that is marked to allow it to modify the instance's own properties
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 Value vs Reference Types free