Question: What is the difference between a heap and a stack?
- The stack contains stored value types; the heap contains stored reference types.
- The heap is stored value types; the stack is stored reference types.
- The heap is stored object types; the stack is stored class types.
- The stack is stored object types; the heap is stored class types.
Answer: The correct answer of the above question is Option A:The stack contains stored value types; the heap contains stored reference types.