ISRO 2014 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0147

Consider a standard Circular Queue implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[0],q[1],... q[10]. The front and rear pointers are initialized to point at q[2]. In which position will the ninth element be added?
  1. A
    q[0]
  2. B
    q[1]
  3. C
    q[9]
  4. D
    q[10]

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/17423/isro2014-36

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com