单选题
若循环队列使用C数组A[m]存放其数据元素,已知头指针front指向队首元素,尾指针rear指向队尾元素后的空单元,则当前队列中的元素个数为( )。【华中科技大学2007一、3(2分)】
A、
(rear—front+m)%m
B、
rear-front+1
C、
rear-front
D、
rear-front-1
【正确答案】
A
【答案解析】
提交答案
关闭