Sollicitatievraag bij Computools

Can you explain the difference between stack and heap memory in C++, and when would you use each?