A-A+
以下运算实现在循环队上的出队列 请在______处用适当的语句予以填充。 int OutC
问题详情
以下运算实现在循环队上的出队列,请在______处用适当的语句予以填充。
int OutCycQueue(CycqueueTp*sq,DataType*x)
{ if(sq—>front==______){error("队空");return(0);)
else{______;
______;
return(1);
}
}请帮忙给出正确答案和分析,谢谢!
参考答案
正确答案:sq—>rear sq—>front=(sq—>front+1)%maxsize *x=sq—>data[sq—>front]
sq—>rear sq—>front=(sq—>front+1)%maxsize *x=sq—>data[sq—>front]