单选题来自题库:计算机 (电网)

以数组Data[m+1]作为循环队列SQ的存储空间,front为头指针,rear为队尾指针,则执行出队操作的语句是()。

  • Afront=front+1
  • Bfront=(front+1)%m
  • Cfront=(front+1)%(m+1)
  • Drear=(rear+1)%m

参考答案

C

答案解析

循环队列的出队操作是:front=(front+1)%(m+l)。