Hi all,
This is a simple doubt regarding the circular queues in C. While doing the wrap around process there are two method to do the same.
ie, say
front = front + 1;
if(front == MAX_Q_SIZE)
front = 0;
or,
front = (front + 1) % MAX_Q_SIZE
Can anyone kindly explain me the difference between the two codes. I mean which one if more efficient and why?
Thanks in advance..