ProgrammingModerate

A queue made from a singly linked list with a head and a tail pointer enqueues 1, 2 and 3, then dequeues once. What is the front value now?

  1. A. 1
  2. B. 3
  3. C. 0
  4. D. 2

Correct answer: D. 2

The dequeue removes 1 from the front, so 2 becomes the front value.

More C Programming questions

Exams that ask this topic