what is the use of stack in c
Stack is a last-in, first-out (LIFO) data structure. i.e. the element added last to the stack will be the one to be removed first. Typical use cases of stacks include:- (1) During debugging it is quite common to examine the function call stack during panics. (2) In RTOS like Symbian there are concepts like cleanup stack to avoid memory leaks. Some of the common terminology associated with stacks include PUSH, POP and TOP of the stack.