A .......... is a container that implements Last-In-First-Out (LIFO) protocol.

2024

A .......... is a container that implements Last-In-First-Out (LIFO) protocol.

  1. A.

    Queue

  2. B.

    Stack

  3. C.

    Object

  4. D.

    Interface

Attempted by 1422 students.

Show answer & explanation

Correct answer: B

The correct answer is a Stack.

A Stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle. In this protocol, the last element added to the stack is the first one to be removed. This behavior distinguishes it from other containers like Queues.

Explore the full course: Hpsc Pgt Computer Science