stacks learning objective stack is an important data structure which is extensively used in computer applications in this we will study about the important features of stacks to understand how and why they organize the data so uniquely the will also illustrate the implementation of stacks by using both arrays as well as linked lists finallythe will discuss in detail some of the very useful areas where stacks are primarily used introduction stack is an important data structure which stores its elements in an ordered manner we will explain the concept of stacks using an analogy you must have seen pile of plates where one plate is placed on top of another as shown in fig nowwhen you want to remove plateyou remove the topmost plate first henceyou can add and remove an element ( plateonly at/from one position which is the topmost position stack is linear data structure which uses the same principlei the elements in stack are added and removed only from one endwhich is called the top hencea stack is called lifo (last-in-first-outdata the topmost another plate structureas the element that was inserted last is the first one to plate will will be be removed added on top be taken out first of this now the question is where do we need stacks in computer plate sciencethe answer is in function calls consider an examplewhere we are executing function in the course of its executionfunction calls another function function in turn calls another function cwhich calls function figure stack of plates