SlideShare a Scribd company logo
Stack

Presentation on Stack
By
Patta Jagadeeswara Rao,
Software Engineer,

Patta Jagadeeswara Rao, MCA.
Introduction to Stack


A Stack is a Linear Data Structure.



The Data Items in the stack are inserted and deleted from

one end. That is called Top of the stack.




Stack follows LIFO (Last In First Out) Mechanism.

Stacks are mostly used in system software. Like compilers and
Operating Systems, etc..



Insert values into stack is called push operation.



Reading Values from stack is called pop operation.
Patta Jagadeeswara Rao, MCA.
Introduction to Stack (Cont..)


The Stack starts with position of 0(zero) .



The Maximum Position of Stack is n-1.







When The position of Stack is zero. Then, the stack is
underflow.
When The position of Stack is grater than n-1. Then, the
stack is called overflow.
Once an item is popped from stack, it is no longer
available.
Patta Jagadeeswara Rao, MCA.
Stack Operations








There are Two operations in stack. Those are push
and pop.
The push operation is used to insert the values into
stack.
The pop operation is used to Retrieve the values from
the stack.
The best example for stack is the bunch of plates in
the kitchen.
Patta Jagadeeswara Rao, MCA.
Example for stack
# include <stdio.h>
# include <conio.h>

char jaggu[100];
int top = 0;

void push(void);
void pop(void);
void main()
{
Patta Jagadeeswara Rao, MCA.
Example for stack(cont..)
Int ch = 0;
while(1)

{
printf(“1. Add new item”);
printf(“2. Delete item”);
printf(“3. Quit”);
printf(“Enter Your Choice :”);

scanf(“%d”, &ch);
Patta Jagadeeswara Rao, MCA.
Example for Stack(cont..)
switch(ch)
{

case 1: push();
break;
case 2: pop();
break;
case 3: return;
}}}
Patta Jagadeeswara Rao, MCA.
Example for Stack(cont..)
Void push(void)

{
if(top >=100)

{
printf(“stack if full”);
return;
}
else
Patta Jagadeeswara Rao, MCA.
Example for stack(cont..)
{
printf(“ The item is : %ch”, gets(jaggu[top]));

if(!jaggu[top])
{
top ++;
}
}
Patta Jagadeeswara Rao, MCA.
Example for stack(cont..)
Void pop(void)
{
top - - ;
if(top < 0)
{

printf(“stack is empty”); return;
}

printf(“The item is :%ch”, jaggu[top]);}
Patta Jagadeeswara Rao, MCA.
Thank You
Patta Jagadeeswara Rao, MCA.
Ad

More Related Content

What's hot (20)

Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
Afaq Mansoor Khan
 
Project of data structure
Project of data structureProject of data structure
Project of data structure
Umme habiba
 
Stack
StackStack
Stack
Zaid Shabbir
 
stack presentation
stack presentationstack presentation
stack presentation
Shivalik college of engineering
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
Selvin Josy Bai Somu
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
vaibhav2910
 
Stack of Data structure
Stack of Data structureStack of Data structure
Stack of Data structure
Sheikh Monirul Hasan
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
Yaksh Jethva
 
Stack in Sata Structure
Stack in Sata StructureStack in Sata Structure
Stack in Sata Structure
Muhazzab Chouhadry
 
Stacks, Queues, Deques
Stacks, Queues, DequesStacks, Queues, Deques
Stacks, Queues, Deques
A-Tech and Software Development
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
 
Stack project
Stack projectStack project
Stack project
Amr Aboelgood
 
Stack
StackStack
Stack
Samsil Arefin
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
Education Front
 
Stacks
StacksStacks
Stacks
sweta dargad
 
Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)
Self-Employed
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADT
Soumen Santra
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Stacks and Queue - Data Structures
Stacks and Queue - Data StructuresStacks and Queue - Data Structures
Stacks and Queue - Data Structures
Dr. Jasmine Beulah Gnanadurai
 
Queues
QueuesQueues
Queues
Ashim Lamichhane
 

Viewers also liked (20)

Stack Data structure
Stack Data structureStack Data structure
Stack Data structure
B Liyanage Asanka
 
Stack Data Structure V1.0
Stack Data Structure V1.0Stack Data Structure V1.0
Stack Data Structure V1.0
Zidny Nafan
 
Queue as data_structure
Queue as data_structureQueue as data_structure
Queue as data_structure
eShikshak
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
anooppjoseph
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
Sumit Gupta
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720
Thomas Callaghan
 
MeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich pictureMeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich picture
MeTApresents
 
Career Hub Rich Picture
Career Hub Rich PictureCareer Hub Rich Picture
Career Hub Rich Picture
guestc990b6
 
Viisio based rich picture version 2.0
Viisio based rich picture version 2.0Viisio based rich picture version 2.0
Viisio based rich picture version 2.0
Mithun112
 
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
American Research Thoughts
 
CPI Rich Picture
CPI Rich Picture CPI Rich Picture
CPI Rich Picture
Hossam El-Shazly
 
Array data structure
Array data structureArray data structure
Array data structure
maamir farooq
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
khabbab_h
 
Rich Picture One Of The Tools
Rich Picture   One Of The ToolsRich Picture   One Of The Tools
Rich Picture One Of The Tools
guestc990b6
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
student
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
Amr E. Mohamed
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
tameemyousaf
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
Navtar Sidhu Brar
 
Rich pictures
Rich picturesRich pictures
Rich pictures
BSBEtalk
 
The Rich Picture A Tool For Reasoning About Work Context
The Rich Picture   A Tool For Reasoning About Work ContextThe Rich Picture   A Tool For Reasoning About Work Context
The Rich Picture A Tool For Reasoning About Work Context
guestc990b6
 
Stack Data Structure V1.0
Stack Data Structure V1.0Stack Data Structure V1.0
Stack Data Structure V1.0
Zidny Nafan
 
Queue as data_structure
Queue as data_structureQueue as data_structure
Queue as data_structure
eShikshak
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
anooppjoseph
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
Sumit Gupta
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720
Thomas Callaghan
 
MeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich pictureMeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich picture
MeTApresents
 
Career Hub Rich Picture
Career Hub Rich PictureCareer Hub Rich Picture
Career Hub Rich Picture
guestc990b6
 
Viisio based rich picture version 2.0
Viisio based rich picture version 2.0Viisio based rich picture version 2.0
Viisio based rich picture version 2.0
Mithun112
 
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
American Research Thoughts
 
Array data structure
Array data structureArray data structure
Array data structure
maamir farooq
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
khabbab_h
 
Rich Picture One Of The Tools
Rich Picture   One Of The ToolsRich Picture   One Of The Tools
Rich Picture One Of The Tools
guestc990b6
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
student
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
Amr E. Mohamed
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
tameemyousaf
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
Navtar Sidhu Brar
 
Rich pictures
Rich picturesRich pictures
Rich pictures
BSBEtalk
 
The Rich Picture A Tool For Reasoning About Work Context
The Rich Picture   A Tool For Reasoning About Work ContextThe Rich Picture   A Tool For Reasoning About Work Context
The Rich Picture A Tool For Reasoning About Work Context
guestc990b6
 
Ad

Similar to data structure, stack, stack data structure (20)

Stack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi LecturerStack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi Lecturer
gomathi chlm
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
Hasan Mahadi Riaz
 
Stack organization
Stack organizationStack organization
Stack organization
chauhankapil
 
Data Structure
Data Structure Data Structure
Data Structure
Ibrahim MH
 
stack 1.pdf
stack 1.pdfstack 1.pdf
stack 1.pdf
hafsa40
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
Vineeta Garg
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9
Getachew Ganfur
 
Rana Junaid Rasheed
Rana Junaid RasheedRana Junaid Rasheed
Rana Junaid Rasheed
Rana junaid Rasheed
 
STACK WITH ITS DIFFERENT OPERATIONS .
STACK WITH ITS DIFFERENT OPERATIONS        .STACK WITH ITS DIFFERENT OPERATIONS        .
STACK WITH ITS DIFFERENT OPERATIONS .
Supriyo Dana
 
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptxSTACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
KALPANAC20
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
Stack data structure
Stack data structureStack data structure
Stack data structure
rogineojerio020496
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
Apurbo Datta
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
skilljiolms
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
SAGARDAVE29
 
Stack data structures with definition and code
Stack data structures with definition and codeStack data structures with definition and code
Stack data structures with definition and code
bansidharj11
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
SeethaDinesh
 
Stack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi LecturerStack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi Lecturer
gomathi chlm
 
Stack organization
Stack organizationStack organization
Stack organization
chauhankapil
 
Data Structure
Data Structure Data Structure
Data Structure
Ibrahim MH
 
stack 1.pdf
stack 1.pdfstack 1.pdf
stack 1.pdf
hafsa40
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9
Getachew Ganfur
 
STACK WITH ITS DIFFERENT OPERATIONS .
STACK WITH ITS DIFFERENT OPERATIONS        .STACK WITH ITS DIFFERENT OPERATIONS        .
STACK WITH ITS DIFFERENT OPERATIONS .
Supriyo Dana
 
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptxSTACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
KALPANAC20
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...SAMPLE QUESTION PAPER (THEORY)  CLASS: XII SESSION: 2024-25  COMPUTER SCIENCE...
SAMPLE QUESTION PAPER (THEORY) CLASS: XII SESSION: 2024-25 COMPUTER SCIENCE...
MafnithaKK
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
skilljiolms
 
Stack data structures with definition and code
Stack data structures with definition and codeStack data structures with definition and code
Stack data structures with definition and code
bansidharj11
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
SeethaDinesh
 
Ad

More from pcnmtutorials (18)

12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescript12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescript
pcnmtutorials
 
11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript
pcnmtutorials
 
10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript
pcnmtutorials
 
9. ES6 | Let And Const | TypeScript | JavaScript
9. ES6 | Let And Const | TypeScript | JavaScript9. ES6 | Let And Const | TypeScript | JavaScript
9. ES6 | Let And Const | TypeScript | JavaScript
pcnmtutorials
 
8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript
pcnmtutorials
 
7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript
pcnmtutorials
 
6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript
pcnmtutorials
 
5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment 5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment
pcnmtutorials
 
4. Template strings | ES6
4. Template strings | ES64. Template strings | ES6
4. Template strings | ES6
pcnmtutorials
 
3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON
pcnmtutorials
 
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
pcnmtutorials
 
1. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES61. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES6
pcnmtutorials
 
Decorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 DecoratorsDecorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 Decorators
pcnmtutorials
 
Web workers | JavaScript | HTML API
Web workers | JavaScript | HTML APIWeb workers | JavaScript | HTML API
Web workers | JavaScript | HTML API
pcnmtutorials
 
Declaration merging | Typescript
Declaration merging | TypescriptDeclaration merging | Typescript
Declaration merging | Typescript
pcnmtutorials
 
Module resolution | Typescript
Module resolution | TypescriptModule resolution | Typescript
Module resolution | Typescript
pcnmtutorials
 
Material design in android L developer Preview
Material design in android L developer PreviewMaterial design in android L developer Preview
Material design in android L developer Preview
pcnmtutorials
 
1.introduction to data_structures
1.introduction to data_structures1.introduction to data_structures
1.introduction to data_structures
pcnmtutorials
 
12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescript12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescript
pcnmtutorials
 
11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript
pcnmtutorials
 
10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript
pcnmtutorials
 
9. ES6 | Let And Const | TypeScript | JavaScript
9. ES6 | Let And Const | TypeScript | JavaScript9. ES6 | Let And Const | TypeScript | JavaScript
9. ES6 | Let And Const | TypeScript | JavaScript
pcnmtutorials
 
8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript
pcnmtutorials
 
7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript
pcnmtutorials
 
6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript
pcnmtutorials
 
5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment 5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment
pcnmtutorials
 
4. Template strings | ES6
4. Template strings | ES64. Template strings | ES6
4. Template strings | ES6
pcnmtutorials
 
3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON
pcnmtutorials
 
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
2. Classes | Object Oriented Programming in JavaScript | ES6 | JavaScript
pcnmtutorials
 
1. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES61. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES6
pcnmtutorials
 
Decorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 DecoratorsDecorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 Decorators
pcnmtutorials
 
Web workers | JavaScript | HTML API
Web workers | JavaScript | HTML APIWeb workers | JavaScript | HTML API
Web workers | JavaScript | HTML API
pcnmtutorials
 
Declaration merging | Typescript
Declaration merging | TypescriptDeclaration merging | Typescript
Declaration merging | Typescript
pcnmtutorials
 
Module resolution | Typescript
Module resolution | TypescriptModule resolution | Typescript
Module resolution | Typescript
pcnmtutorials
 
Material design in android L developer Preview
Material design in android L developer PreviewMaterial design in android L developer Preview
Material design in android L developer Preview
pcnmtutorials
 
1.introduction to data_structures
1.introduction to data_structures1.introduction to data_structures
1.introduction to data_structures
pcnmtutorials
 

Recently uploaded (20)

Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 

data structure, stack, stack data structure

  • 1. Stack Presentation on Stack By Patta Jagadeeswara Rao, Software Engineer, Patta Jagadeeswara Rao, MCA.
  • 2. Introduction to Stack  A Stack is a Linear Data Structure.  The Data Items in the stack are inserted and deleted from one end. That is called Top of the stack.   Stack follows LIFO (Last In First Out) Mechanism. Stacks are mostly used in system software. Like compilers and Operating Systems, etc..  Insert values into stack is called push operation.  Reading Values from stack is called pop operation. Patta Jagadeeswara Rao, MCA.
  • 3. Introduction to Stack (Cont..)  The Stack starts with position of 0(zero) .  The Maximum Position of Stack is n-1.    When The position of Stack is zero. Then, the stack is underflow. When The position of Stack is grater than n-1. Then, the stack is called overflow. Once an item is popped from stack, it is no longer available. Patta Jagadeeswara Rao, MCA.
  • 4. Stack Operations     There are Two operations in stack. Those are push and pop. The push operation is used to insert the values into stack. The pop operation is used to Retrieve the values from the stack. The best example for stack is the bunch of plates in the kitchen. Patta Jagadeeswara Rao, MCA.
  • 5. Example for stack # include <stdio.h> # include <conio.h> char jaggu[100]; int top = 0; void push(void); void pop(void); void main() { Patta Jagadeeswara Rao, MCA.
  • 6. Example for stack(cont..) Int ch = 0; while(1) { printf(“1. Add new item”); printf(“2. Delete item”); printf(“3. Quit”); printf(“Enter Your Choice :”); scanf(“%d”, &ch); Patta Jagadeeswara Rao, MCA.
  • 7. Example for Stack(cont..) switch(ch) { case 1: push(); break; case 2: pop(); break; case 3: return; }}} Patta Jagadeeswara Rao, MCA.
  • 8. Example for Stack(cont..) Void push(void) { if(top >=100) { printf(“stack if full”); return; } else Patta Jagadeeswara Rao, MCA.
  • 9. Example for stack(cont..) { printf(“ The item is : %ch”, gets(jaggu[top])); if(!jaggu[top]) { top ++; } } Patta Jagadeeswara Rao, MCA.
  • 10. Example for stack(cont..) Void pop(void) { top - - ; if(top < 0) { printf(“stack is empty”); return; } printf(“The item is :%ch”, jaggu[top]);} Patta Jagadeeswara Rao, MCA.