Keysight Technologies Interview Question

Difference between stack and heap