Question & Additional Information
 
What is a heap and a stack?
Add to My IQ
 

Answer Title
Answer
There are 2 kinds of heap - 1: a chunk of memory where data is stored and 2: a tree based data structure. When we talk about the heap and the stack we mean the first kind of heap.  The stack is a LIFO data structure that stores variables and flow control information. Typically each thread will have its own stack.
Question Tag Title
Tags
Question Asked At Title
Asked At
None
Question Job Title
Job Titles


Check out our newest job listings!

Post a Job! $49 for 60 days



Your Name:
Add your comment text
 
Related Questions
Related Questions
Flag this interview question as inappropriate Inappropriate
See Answer
Boxing converts a value-type to a reference-type, thus storing the object on the heap.  Unboxing converts a reference-type to a value-type, thus storing the value on the stack.
Create Date
:
Tuesday, May 13, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
Garbage collection eliminates uneeded objects. the new statement allocates memory for an object on the heap.When no objects reference the object it may be removed from the heap (this is a non deterministic process).Finalize is called just before the memory is released.
Create Date
:
Tuesday, May 13, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
Converting a value type (stack->heap) to a reference type (heap->stack), and vise-versa.
Create Date
:
Tuesday, May 13, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
A reference type is known by a reference to a memory location on the heap.A value type is directly stored in a memory location on the stack. A reference type is essentially a pointer, dereferencing the pointer takes more time than directly accessing the direct memory location of a value type.
Create Date
:
Tuesday, May 13, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
CTS is an acronym for Common Type System which is an integral part of .net and which ensures language compatibility, interoperability and integration. Because .net treats all languages equal a class written in C# should be equivalent to class written in VB.net. Languages must agree on the meaning of these concepts before they can integrate with one another. To make this integration possible Microsoft has specified a common type system which every .net language must follow. There are two types in CTS: value type and reference type. Value types reference values on the stack. When a value type is passed to a function they are passed by value i.e. original value of the passed variable will not change. If a type consumes memory then it should be declared as a reference type. They contain references to heap based objects and are reclaimed by the garbage collector. When you pass a variable by reference then if the called function modifies it, it is visible in the calling function because it works on the actual object contrast to value type where a copy of the object is passed.
Create Date
:
Saturday, May 10, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
 
• More Related Questions: 
Suggestions & Comments




Share Your Interview Questions
Ask Interview Questions
View Unanswered Questions





Advertise on this site