What are the various operations performed on stack?



What are the various operations performed on stack?..

Answer / Rohit Kumar Kushwaha

"The primary operations on a stack include:
1. Push: Adds an element onto the top of the stack
2. Pop: Removes the topmost element from the stack
3. Peek or Top: Returns the topmost element without removing it
4. Size: Determines the number of elements on the stack
5. IsEmpty: Checks if the stack is empty"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is swift faster than c++?

1 Answers  


Can we make any program in c++ without using any header file and what is the shortest program in c++.

1 Answers   MCN Solutions,


When should you use multiple inheritance?

2 Answers  


Which operator cannot be overloaded c++?

1 Answers  


Define whitespace in C++.

1 Answers   HCL,


What is the cout in c++?

1 Answers  


What is Namespace?

5 Answers   HCL, Samsung,


Define a nested class.

1 Answers  


How do you clear a buffer in c++?

1 Answers  


How is c++ different from java?

1 Answers  


The "virtual" specifier in a member function enables which one of the following? a) Monmorphism b) Late binding c) Metamorphism d) Solomorphism e) Inheritance

4 Answers   Quark,


What is the full name of logo?

1 Answers  


Categories