Write a program in C++ with …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Write a program in C++ with the help of class array_stack with following members-
Member data:
An array of integer ar[MAX](Where MAX is a globally-declared symbolic-constant (integer) with size
according to the requirement of user)
top (It keeps the index of top most array element)
Member Functions-
A constructor that initialize –1 in top (Makes array_stack ready to push)
Push():-To push an item in stack.
Pop():-To pop an item from stack
Display()-To display the content of stack without popping
Make a menu in C++ with following options-
1. A initialize the stack( top must be -1)
2. To push an item in stack.
3. To pop an item from stack
4. To display the content of stack without popping
5. Exit
Posted by Harsh Kumar 7 years, 8 months ago
- 0 answers
ANSWER
Related Questions
Posted by Hanni Pham 1 year, 1 month ago
- 0 answers
Posted by Prawar Narang 1 year, 3 months ago
- 1 answers
Posted by Priya Shukla 1 year, 3 months ago
- 1 answers
Posted by Hanni Pham 1 year, 1 month ago
- 1 answers
Posted by Syedali Fathima 1 year, 3 months ago
- 1 answers
Posted by Kandeepan Jothivel 1 year, 4 months ago
- 2 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app