Stack
STACK >> stack is a linear Data Structure . i.e the data elements organised in sequential order like array. >> Stack is a static data structure, i.e it will stare limit elements. >>It is based on array concept. >>Stack is called FILO( first in last out ) i.e that elements which are inserted first displays last (or) LIFO( last in first out )i.e the elements which are inserted last displays first. TERMINOLOGY OF STACK >>Top of stack >>Over flow >>Under flow >>In stack insertion ,deletion will be held at only on end called 'Top' of stack. >>If stack is full, when you call member function push( ),if will display o/pas over flow. >>If stack is empty ,when you call member function pop( ),it will display o/p as under flow Functions of STACK 1.push() 2.pop() 3.show() 4.quit() Push():- It is a Member-function of a stack which is used to insert a new element, into stack . pop ():-It is a Member function, which is used to delet...
Comments