In a circular queue, how do you increment the rear end of the queue?
A. rear++
B. (rear+1) % CAPACITY
C. (rear % CAPACITY)+1
D. rear–
Answer:B
In a circular queue, how do you increment the rear end of the queue?
A. rear++ B. (rear+1) % CAPACITY C. (rear % CAPACITY)+1 D. rear–
Explanation: Ensures that the values in the rear range from 0 to (CAPACITY-1).