SlideShare una empresa de Scribd logo
1 de 11
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.

Más contenido relacionado

La actualidad más candente (20)

Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
Project of data structure
Project of data structureProject of data structure
Project of data structure
 
Stack
StackStack
Stack
 
stack presentation
stack presentationstack presentation
stack presentation
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 
Stack of Data structure
Stack of Data structureStack of Data structure
Stack of Data structure
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Stack in Sata Structure
Stack in Sata StructureStack in Sata Structure
Stack in Sata Structure
 
Stacks, Queues, Deques
Stacks, Queues, DequesStacks, Queues, Deques
Stacks, Queues, Deques
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Stack project
Stack projectStack project
Stack project
 
Stack
StackStack
Stack
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
 
Stacks
StacksStacks
Stacks
 
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)
 
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
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
 
Stacks and Queue - Data Structures
Stacks and Queue - Data StructuresStacks and Queue - Data Structures
Stacks and Queue - Data Structures
 
Queues
QueuesQueues
Queues
 

Destacado

Stack Data Structure V1.0
Stack Data Structure V1.0Stack Data Structure V1.0
Stack Data Structure V1.0Zidny Nafan
 
Queue as data_structure
Queue as data_structureQueue as data_structure
Queue as data_structureeShikshak
 
Queue data structure
Queue data structureQueue data structure
Queue data structureanooppjoseph
 
Trees data structure
Trees data structureTrees data structure
Trees data structureSumit Gupta
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Thomas 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 pictureMeTApresents
 
Career Hub Rich Picture
Career Hub Rich PictureCareer Hub Rich Picture
Career Hub Rich Pictureguestc990b6
 
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.0Mithun112
 
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 structuremaamir farooq
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Treekhabbab_h
 
Rich Picture One Of The Tools
Rich Picture   One Of The ToolsRich Picture   One Of The Tools
Rich Picture One Of The Toolsguestc990b6
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structurestudent
 
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-TransformAmr E. Mohamed
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arraystameemyousaf
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its typesNavtar Sidhu Brar
 
Rich pictures
Rich picturesRich pictures
Rich picturesBSBEtalk
 
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 Contextguestc990b6
 

Destacado (20)

Stack Data structure
Stack Data structureStack Data structure
Stack Data structure
 
Stack Data Structure V1.0
Stack Data Structure V1.0Stack Data Structure V1.0
Stack Data Structure V1.0
 
Queue as data_structure
Queue as data_structureQueue as data_structure
Queue as data_structure
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720
 
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
 
Career Hub Rich Picture
Career Hub Rich PictureCareer Hub Rich Picture
Career Hub Rich Picture
 
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
 
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...
 
CPI Rich Picture
CPI Rich Picture CPI Rich Picture
CPI Rich Picture
 
Array data structure
Array data structureArray data structure
Array data structure
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
 
Rich Picture One Of The Tools
Rich Picture   One Of The ToolsRich Picture   One Of The Tools
Rich Picture One Of The Tools
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
 
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
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Rich pictures
Rich picturesRich pictures
Rich pictures
 
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
 

Similar a data structure, stack, stack data structure

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 Lecturergomathi chlm
 
Stack organization
Stack organizationStack organization
Stack organizationchauhankapil
 
Data Structure
Data Structure Data Structure
Data Structure Ibrahim MH
 
stack 1.pdf
stack 1.pdfstack 1.pdf
stack 1.pdfhafsa40
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Getachew Ganfur
 
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.pptxKALPANAC20
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptxskilljiolms
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.pptSeethaDinesh
 
Module 2 ppt.pptx
Module 2 ppt.pptxModule 2 ppt.pptx
Module 2 ppt.pptxSonaPathak4
 
Difference between stack and queue
Difference between stack and queueDifference between stack and queue
Difference between stack and queuePulkitmodi1998
 
Data Structures by Maneesh Boddu
Data Structures by Maneesh BodduData Structures by Maneesh Boddu
Data Structures by Maneesh Boddumaneesh boddu
 
Stacks Data structure.pptx
Stacks Data structure.pptxStacks Data structure.pptx
Stacks Data structure.pptxline24arts
 

Similar a 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
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
 
Stack organization
Stack organizationStack organization
Stack organization
 
Data Structure
Data Structure Data Structure
Data Structure
 
stack 1.pdf
stack 1.pdfstack 1.pdf
stack 1.pdf
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
 
Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9Stacks queues-1220971554378778-9
Stacks queues-1220971554378778-9
 
Rana Junaid Rasheed
Rana Junaid RasheedRana Junaid Rasheed
Rana Junaid Rasheed
 
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
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
 
Stack and its operations
Stack and its operationsStack and its operations
Stack and its operations
 
Module 2 ppt.pptx
Module 2 ppt.pptxModule 2 ppt.pptx
Module 2 ppt.pptx
 
Difference between stack and queue
Difference between stack and queueDifference between stack and queue
Difference between stack and queue
 
Data Structures by Maneesh Boddu
Data Structures by Maneesh BodduData Structures by Maneesh Boddu
Data Structures by Maneesh Boddu
 
Stacks Data structure.pptx
Stacks Data structure.pptxStacks Data structure.pptx
Stacks Data structure.pptx
 
Stacks
StacksStacks
Stacks
 

Más de pcnmtutorials

12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescript12. Map | WeakMap | ES6 | JavaScript | Typescript
12. Map | WeakMap | ES6 | JavaScript | Typescriptpcnmtutorials
 
11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScriptpcnmtutorials
 
10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScriptpcnmtutorials
 
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 | JavaScriptpcnmtutorials
 
8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScriptpcnmtutorials
 
7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScriptpcnmtutorials
 
6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScriptpcnmtutorials
 
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 | ES6pcnmtutorials
 
3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSONpcnmtutorials
 
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 | JavaScriptpcnmtutorials
 
1. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES61. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES6pcnmtutorials
 
Decorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 DecoratorsDecorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 Decoratorspcnmtutorials
 
Web workers | JavaScript | HTML API
Web workers | JavaScript | HTML APIWeb workers | JavaScript | HTML API
Web workers | JavaScript | HTML APIpcnmtutorials
 
Declaration merging | Typescript
Declaration merging | TypescriptDeclaration merging | Typescript
Declaration merging | Typescriptpcnmtutorials
 
Module resolution | Typescript
Module resolution | TypescriptModule resolution | Typescript
Module resolution | Typescriptpcnmtutorials
 
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 Previewpcnmtutorials
 
1.introduction to data_structures
1.introduction to data_structures1.introduction to data_structures
1.introduction to data_structurespcnmtutorials
 

Más de 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
 
11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript11. Iterators | ES6 | JavaScript | TypeScript
11. Iterators | ES6 | JavaScript | TypeScript
 
10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript10. symbols | ES6 | JavaScript | TypeScript
10. symbols | ES6 | JavaScript | TypeScript
 
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
 
8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript8. Spread Syntax | ES6 | JavaScript
8. Spread Syntax | ES6 | JavaScript
 
7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript7. Rest parameters | ES6 | JavaScript
7. Rest parameters | ES6 | JavaScript
 
6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript6. Default parameters | ES6 | JavaScript
6. Default parameters | ES6 | JavaScript
 
5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment 5. Destructuring | ES6 | Assignment
5. Destructuring | ES6 | Assignment
 
4. Template strings | ES6
4. Template strings | ES64. Template strings | ES6
4. Template strings | ES6
 
3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON3. Object literals | ES6 | JSON
3. Object literals | ES6 | JSON
 
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
 
1. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES61. Arrow Functions | JavaScript | ES6
1. Arrow Functions | JavaScript | ES6
 
Decorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 DecoratorsDecorators | TypeScript | Angular2 Decorators
Decorators | TypeScript | Angular2 Decorators
 
Web workers | JavaScript | HTML API
Web workers | JavaScript | HTML APIWeb workers | JavaScript | HTML API
Web workers | JavaScript | HTML API
 
Declaration merging | Typescript
Declaration merging | TypescriptDeclaration merging | Typescript
Declaration merging | Typescript
 
Module resolution | Typescript
Module resolution | TypescriptModule resolution | Typescript
Module resolution | Typescript
 
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
 
1.introduction to data_structures
1.introduction to data_structures1.introduction to data_structures
1.introduction to data_structures
 

Último

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Último (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

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.