Heap and Stack Memory .
Stack: Static in memory and allocation happens only during compile time. It’s a special region of your computer’s memory that stores temporary variables created by each function main(). The stack is a “LIFO”(last in, first out) data structure. When a function is called, all local instances will be push on to the current stack and pop/freed when …