What is the method to save data in a stack data structure type?
Data is stored in Stack data structure type using First in Last out (FILO) mechanism. Only top of the stack is accessible at a given instance. Storing mechanism is referred to as a PUSH and retrieve is referred as a POP.