C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 15, Problem 15.19E
Program Plan Intro

Push, pop and top operations of a stack.

Stack Container Adaptor uses sequential container to operate like a stack, which works as Last In First Out basis (LIFO).

push() - This will put a new element at top in stack.
pop() - Removes the element from the top of stack, without returning it.
top() - It will returns the top element of the stack, without deleting it from the stack.

Blurred answer
Students have asked these similar questions
What are the different operations that can be performed on a stack?
Machine organization The following operations are performed on a stack: PUSH A, PUSH B, POP, PUSH C, POP,POP,PUSH D, PUSH E, POP, PUSH F. What does the stack contain after each operation?
Briefly explain stack frame
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