what is stack?

all local variables available inside function are moved to stack memory location for execution and access.

In computer science, a stack is a last in, first out (LIFO) abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by two fundamental operations, called push and pop.