NVIDIA Interview Question

When to use Stack vs Heap memory