Subject:- Data Structure Using C
Made by:- Rahul Sharma
Subject Teacher:- Mr. Jasvinder Singh
STACK
A
Data Structure
What is a Stack?
A stack is a Last In, First Out (LIFO) data
structure,objects inserted last are the first to
come out of the stack
Anything added to the stack goes on the “top”
of the stack
Anything removed from the stack is taken from
the “top” of the stack
Things are removed in the reverse order from
that in which they were inserted
Stack Operations
 PUSH
Adds the object to the top of the stack
 POP
Removes the object at the top of the stack
and returns it
 PEEK
Returns the top object of the stack but does
not remove it from the stack
A LIFO Stack
Top
Bottom
Stack Pointer
Push Pop
Stack 111104232459-phpapp02
Stack 111104232459-phpapp02

More Related Content

PDF
Lorna Mitchell - Future of functions - Codemotion Milan 2017
PPT
Stack implementation using c
PPTX
Introduction to computer networks & it’s usage
PPTX
Understanding the components of standard template library
PPTX
System of book keeping
PPTX
Standard deviation
PPTX
Pipeline processing and space time diagram
PPTX
Object oriented programming
Lorna Mitchell - Future of functions - Codemotion Milan 2017
Stack implementation using c
Introduction to computer networks & it’s usage
Understanding the components of standard template library
System of book keeping
Standard deviation
Pipeline processing and space time diagram
Object oriented programming

More from Rahul Sharma (14)

PPTX
If and select statement
PPTX
Depriciation
PPTX
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
PPTX
Accounting standards(as)
PPT
Listing skill
PPTX
If and select statement
PPTX
Object oriented programming
PPT
Listeningskills 120213044302-phpapp01
PPTX
Euler’s formula
PPTX
Smart cards 07521102013
PPTX
Data,information and database
PPTX
PPT
Basic computer fundamentals
PPTX
Rolling friction
If and select statement
Depriciation
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
Accounting standards(as)
Listing skill
If and select statement
Object oriented programming
Listeningskills 120213044302-phpapp01
Euler’s formula
Smart cards 07521102013
Data,information and database
Basic computer fundamentals
Rolling friction
Ad

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
advance database management system book.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
Complications of Minimal Access-Surgery.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
International_Financial_Reporting_Standa.pdf
PDF
IGGE1 Understanding the Self1234567891011
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Trump Administration's workforce development strategy
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
advance database management system book.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Complications of Minimal Access-Surgery.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
International_Financial_Reporting_Standa.pdf
IGGE1 Understanding the Self1234567891011
History, Philosophy and sociology of education (1).pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Trump Administration's workforce development strategy
Chinmaya Tiranga quiz Grand Finale.pdf
My India Quiz Book_20210205121199924.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Ad

Stack 111104232459-phpapp02

  • 1. Subject:- Data Structure Using C Made by:- Rahul Sharma Subject Teacher:- Mr. Jasvinder Singh STACK
  • 3. What is a Stack? A stack is a Last In, First Out (LIFO) data structure,objects inserted last are the first to come out of the stack Anything added to the stack goes on the “top” of the stack Anything removed from the stack is taken from the “top” of the stack Things are removed in the reverse order from that in which they were inserted
  • 4. Stack Operations  PUSH Adds the object to the top of the stack  POP Removes the object at the top of the stack and returns it  PEEK Returns the top object of the stack but does not remove it from the stack
  • 5. A LIFO Stack Top Bottom Stack Pointer Push Pop