What is stack in C | Data Structure

Stack in C | Data Structure | AskTheCode

A Stack is a linear data structure used to store similar data types in a particular order in which the operations are to be done. They are the data structure following the 'First In Last Out' or 'First In Last Out' order.

Generally, two operations are executed on the Stack; they are:

(i) Push, and (ii) Pop



The operations or functions involved in Stack programming are the following:


Push: Function used to insert an item in the stack.

Pop: Function used to remove out an item from the stock.

Peek: Generally known as Top, used to return the top item stored inside the stack.

isEmpty: Function that returns some boolean value, used to know whether the stack is empty or not.

38 views0 comments

Recent Posts

See All