Memory & GC interview questions

18 real Memory & GC questions from the C# 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 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
Reveal the answer + AI explanation — free account

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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