Question 116Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

Which one of the following is the overflow condition if linear queue is implemented using an array with a size MAX_SIZE?

  1. Arear = MAX_SIZE–1
  2. Brear = MAX_SIZE
  3. Crear = front+1
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (D) More than one of the above

Explanation

Depending on whether rear points at the last used slot or one past it, both rear = MAX_SIZE-1 and rear = MAX_SIZE are accepted overflow conditions, so more than one is correct.

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 116 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.