Consider a standard circular queue ‘q’ implementation (which has same…
ISRO Scientist/Engineer SC · 2014 · Computer ScienceModified — slightly modified from the official paper; see the solution
Consider a standard circular queue ‘q’ implementation (which has 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]. Rear denotes the last occupied position and advances before each new element is stored. In which position will the ninth element be added?
- A.
q[0]
- B.
q[1]
- C.
q[9]
- D.
q[10]
Attempted by 963 students.
Show answer
Correct answer: A
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…