C implementation of a Circular queue