Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
9th Edition
ISBN: 9780134498379
Author: Tony Gaddis
Publisher: PEARSON
Question
Book Icon
Chapter 19, Problem 5RQE
Program Plan Intro

Stack:

A stack is type of container. It performs “Last In First Out”.

  • In stack, the item which is inserted at last will be retrieved first.
  • The elements can be inserted and retrieved at any one end of the stack.
  • There are two types of stacks. They are:
    • Static stack
    • Dynamic stack

Static Stack:

  • A static stack has fixed size.
  • The usual implementation is in the form of an array.
  • The starting size of the stack should be specified.
  • The elements cannot be added if the specified size is full.

Blurred answer
Students have asked these similar questions
Describe two operations that all stacks perform.
Explain the difference between the limited and unbounded stacks.
Stacks and Queues are called data structures because their operations are specialized.

Chapter 19 Solutions

Starting Out with C++ from Control Structures to Objects (9th Edition)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning