1.

In which context does the stack operates?(a) FIFO(b) LIFO(c) Both FIFO & LIFO(d) LIFIThe question was posed to me in quiz.My question is taken from Sequence Adapters topic in portion Class Hierarchies, Library & Containers of C++

Answer»

Right choice is (b) LIFO

Easiest EXPLANATION - A stack is a container where elements OPERATE in a LIFO CONTEXT, where elements are inserted (PUSHED) and removed (POPPED) from the end of the container.



Discussion

No Comment Found

Related InterviewSolutions