What is Stack? Explain its uses - C++

What is Stack? Explain its uses.

Stack is a collection of objects that works in LIFO (Last in First out) mechanism. This means that the object that is inserted first is removed last in a stack. Stacks are used in expression evaluations and syntax parsing. Expressions are evaluated from L to R and stacks can be implemented to evaluate them using “Push” and “pop”.

What is Stack? Explain its uses.

Stack is a Last in First out (LIFO) data structure. It is a linear structure and one can insert and delete from one end only which is called the top. It is very effective in rectifying syntax errors like missing parentheses etc.
What is a Wrapper class? - C++
What is a Wrapper class? - Wrapper classes are classes that allow primitive types to be accessed as objects...
What do you mean by stack unwinding? - C++
What do you mean by stack unwinding? - When an exception is thrown, C++ calls destructors to destroy all the objects....
What is the use of ‘using’ declaration?
What is the use of ‘using’ declaration? - In using-declaration, we have using keyword followed by a fully qualified name...
Post your comment
Discussion Board
hi
good
meenatchi 10-5-2016