Memory & GC interview questions

18 Memory & GC questions from the C# 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 Managed heap?

Junior
  1. A.the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances
  2. B.the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets
  3. C.the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  4. D.a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation

Answer + AI explanation with Pro

2. Which term means: "the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances"?

Junior
  1. A.Managed heap
  2. B.IDisposable interface
  3. C.Large object heap
  4. D.Using statement

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Managed heap — a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  2. B.Managed heap — the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances
  3. C.Managed heap — the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  4. D.Managed heap — an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection

Answer + AI explanation with Pro

4. What is Generational collection?

Mid
  1. A.the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances
  2. B.the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  3. C.a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  4. D.an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection

Answer + AI explanation with Pro

5. Which term means: "the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young"?

Mid
  1. A.Finalizer
  2. B.Generational collection
  3. C.IDisposable interface
  4. D.Using statement

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.Generational collection — the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances
  2. B.Generational collection — the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  3. C.Generational collection — a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  4. D.Generational collection — the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets

Answer + AI explanation with Pro

7. What is IDisposable interface?

Mid
  1. A.the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets
  2. B.an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  3. C.a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  4. D.the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young

Answer + AI explanation with Pro

8. Which term means: "the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets"?

Mid
  1. A.Finalizer
  2. B.Using statement
  3. C.Large object heap
  4. D.IDisposable interface

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.IDisposable interface — a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  2. B.IDisposable interface — the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances
  3. C.IDisposable interface — an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  4. D.IDisposable interface — the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets

Answer + AI explanation with Pro

10. What is Using statement?

Mid
  1. A.an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  2. B.a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  3. C.the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets
  4. D.the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young

Answer + AI explanation with Pro

11. Which term means: "a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown"?

Mid
  1. A.Using statement
  2. B.Generational collection
  3. C.IDisposable interface
  4. D.Large object heap

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.Using statement — an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  2. B.Using statement — the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets
  3. C.Using statement — the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  4. D.Using statement — a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown

Answer + AI explanation with Pro

13. What is Finalizer?

Senior
  1. A.the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets
  2. B.an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  3. C.a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  4. D.a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown

Answer + AI explanation with Pro

14. Which term means: "an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection"?

Senior
  1. A.Finalizer
  2. B.Using statement
  3. C.Large object heap
  4. D.Generational collection

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.Finalizer — a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  2. B.Finalizer — a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  3. C.Finalizer — an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  4. D.Finalizer — the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances

Answer + AI explanation with Pro

16. What is Large object heap?

Senior
  1. A.a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  2. B.a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  3. C.an object cleanup method run non-deterministically by the collector before reclamation, used as a safety net for unmanaged resources and adding overhead to collection
  4. D.the region of memory where reference-type objects are allocated and from which the runtime's automatic collector reclaims unreachable instances

Answer + AI explanation with Pro

17. Which term means: "a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation"?

Senior
  1. A.Large object heap
  2. B.Using statement
  3. C.IDisposable interface
  4. D.Managed heap

Answer + AI explanation with Pro

18. Which statement is correct?

Senior
  1. A.Large object heap — a separate area for allocations above a size threshold that is collected less frequently and historically not compacted, making it prone to fragmentation
  2. B.Large object heap — the collector strategy that segregates objects into age tiers, collecting the youngest most often on the premise that most objects die young
  3. C.Large object heap — a construct that guarantees Dispose is invoked on a resource when control leaves the block, even if an exception is thrown
  4. D.Large object heap — the contract exposing a Dispose method for deterministic release of unmanaged resources such as file handles or sockets

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 Memory & GC 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