Multiple choice technology programming languages

A queue follows

  1. FIFO

  2. LIFO

  3. both (a) and (b)

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A queue follows FIFO (First In, First Out) - the first element added to the queue is the first one removed. This is like a line of people waiting where the first person to arrive is the first to be served.

AI explanation

A queue is a First-In-First-Out (FIFO) data structure: elements are added at the rear (enqueue) and removed from the front (dequeue), so the first element inserted is the first one removed. This is the defining property that distinguishes a queue from a stack, which follows LIFO (Last-In-First-Out) instead.