Computer Science Medium css pms

Which data structure follows the Last In First Out (LIFO) principle?

  • A Queue
  • B Array
  • C Stack
  • D Linked List
Correct Answer: Option C — Stack
Explanation: A stack follows the Last In First Out principle, meaning the most recently added element is removed first. Stacks are widely used in function calls, recursion, expression evaluation, and memory management.
Related MCQs