What is the primary difference between 'stack' and 'heap' memory in programming?
-
A
Stack is for long-term storage; heap is for temporary computation
-
B
Stack is managed automatically with LIFO allocation; heap is manually managed with dynamic allocation
-
C
Stack stores only integers; heap stores objects
-
D
Stack is slower than heap for all operations