Difference between Stack and Queue - C++

Difference between Stack and Queue.

Stack is a collection of objects that works in LIFO (Last in First out) mechanism while Queue is FIFO (First in First out). This means that the object that is inserted first is removed last in a stack while an object that is inserted first is removed first in a queue.

Difference between Stack and Queue.

Stack is a Last in First out (LIFO) data structure whereas Queue is a First in First out (FIFO) data structure.
What is Stack? Explain its uses - C++
What is Stack? Explain its uses - Stack is a Last in First out (LIFO) data structure..
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....
Post your comment
Discussion Board
Stack and Queue
Stack -ex-in new cd box ist in last out.and Queue -ex ist in ist out
Vibhakar Dubey 10-25-2012