What does the dequeue operation do in a queue ?

2023

What does the dequeue operation do in a queue ?

  1. A.

    Returns the number of elements present

  2. B.

    Indicates whether the queue is empty or not

  3. C.

    Removes the element at the front

  4. D.

    Adds the element at the end

Attempted by 183 students.

Show answer & explanation

Correct answer: C

A queue is a First-In-First-Out (FIFO) data structure. The dequeue operation deletes or removes the element from the front of the queue, where elements have been residing the longest. Therefore, Option C is the correct answer.

Explore the full course: Btsc Lab Assistant