Please explain what is Heap and what is Stack?
Submitted by: Muhammad☛ Both are memory locations, wherein Heap is global and Stack is local.
☛ The Heap is application level while the Stack is thread-level.
☛ The Stack has a defined first-in-first-out stack structure, while the Heap does not have a defined data structure.
☛ Its size is defined at the time of its creation. For Heap, the size is defined when starting the application and for Stack, when creating a thread.
☛ Both can grow dynamically.
☛ The Stack is faster than the Heap. A stack is in “cache” and doesn't have to synchronize with other threads like the Heap.
☛ The Stack stores values while the Heap stores objects.
Submitted by: Muhammad
☛ The Heap is application level while the Stack is thread-level.
☛ The Stack has a defined first-in-first-out stack structure, while the Heap does not have a defined data structure.
☛ Its size is defined at the time of its creation. For Heap, the size is defined when starting the application and for Stack, when creating a thread.
☛ Both can grow dynamically.
☛ The Stack is faster than the Heap. A stack is in “cache” and doesn't have to synchronize with other threads like the Heap.
☛ The Stack stores values while the Heap stores objects.
Submitted by: Muhammad
Read Online Senior .Net Developer Job Interview Questions And Answers
Top Senior .Net Developer Questions
☺ | Do you know what is Garbage Collector? |
☺ | Do you know what is the difference between an abstract class and an interface? |
☺ | Please tell us what is the difference between Override and Overload in a method? |
☺ | Tell us why do we use the “using” statement? |
☺ | Do you know what is .NET Standard? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |