Question: What is the difference between a heap and a stack?

  1. The stack contains stored value types; the heap contains stored reference types.
  2. The heap is stored value types; the stack is stored reference types.
  3. The heap is stored object types; the stack is stored class types.
  4. 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.