Stack · Class 12 · CBSE · Science Computer Science

Which principle is followed by a stack data structure?

Practice question from Stack (Class 12 · CBSE · Science Computer Science), with the correct answer and a step-by-step solution.

easy · MCQ · Q-88FC26

Which principle is followed by a stack data structure?

  1. A.FIFO (First In, First Out)
  2. B.LIFO (Last In, First Out)Correct answer
  3. C.Random access
  4. D.Priority-based access

Solution

A stack follows the LIFO principle: the item inserted last is removed first. The insertion operation is called push, and the deletion operation is called pop.

More from Stack

All of Stack

Practise more Computer Science

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed