Siemens PLM Software Interview Question: Difference between Heap and S... | Glassdoor

Interview Question

NX Developer Interview(Student Candidate) Milford, OH

Difference between Heap and Stack

c++ programming, c, memory management

Interview Answer

3 Answers


I had no clue

Interview Candidate on Nov 12, 2010

all objects get stored in heap while all value type get stored in stack..heap automatically maage memory using garbage collection..while in stack explicitly memory is managed using heap,CLR is responsile for memory management.

monika on Feb 22, 2011

Heap : When you try to allocate memory by using "new " keyword .The memory will be stored in heap memory.
Stack : The memory will be allocated automatically and free automatically once variable out of the scope

Ravi on Apr 8, 2017

Add Answers or Comments

To comment on this, Sign In or Sign Up.