Show the worked solutionThe statement sends \(\text{rear}\) back to index 0 after the last slot \(\text{maxsize}-1\); it is the same as\[\text{rear}=(\text{rear}+1)\bmod\text{maxsize}.\]Wrapping around so that freed slots at the front are reused is exactly how a circular queue advances its rear.(B) A linear queue never wraps; it reports overflow at \(\text{maxsize}-1\) — incorrect.(C) A stack uses only a top index — incorrect.(D) A deque needs indices moving in both directions, not just this one rule — incorrect.Answer: A
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com