Value vs Reference Types interview questions

15 Value vs Reference Types questions from the Swift 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.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

Answer + AI explanation with Pro

2. Which term means: "a value type that is copied when assigned or passed, with each copy independent"?

Junior
  1. A.Mutating method
  2. B.Copy-on-write
  3. C.Struct
  4. D.Value semantics

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which term means: "a reference type whose instances are shared, so multiple variables point to the same object"?

Junior
  1. A.Value semantics
  2. B.Class
  3. C.Mutating method
  4. D.Copy-on-write

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which term means: "behavior where mutating one variable never affects another that was assigned from it"?

Mid
  1. A.Value semantics
  2. B.Copy-on-write
  3. C.Struct
  4. D.Mutating method

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

11. Which term means: "an optimization that defers duplicating backing storage until a shared instance is actually mutated"?

Senior
  1. A.Struct
  2. B.Copy-on-write
  3. C.Class
  4. D.Value semantics

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which term means: "a function on a value type that is marked to allow it to modify the instance's own properties"?

Mid
  1. A.Class
  2. B.Struct
  3. C.Mutating method
  4. D.Copy-on-write

Answer + AI explanation with Pro

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

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 Value vs Reference Types 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