题目内容:
设数组 Data[0..m]作为循环队列 SQ 的存储空间,front 为队头指针,rear 为队尾指针,则执行出队操作的语句为( )。
A.front=front+1
B.front=(front+1)% m
C.rear=(rear+1)%m
D.front=(front+1)%(m+1)
参考答案:
答案解析:
设数组 Data[0..m]作为循环队列 SQ 的存储空间,front 为队头指针,rear 为队尾指针,则执行出队操作的语句为( )。
A.front=front+1
B.front=(front+1)% m
C.rear=(rear+1)%m
D.front=(front+1)%(m+1)