Marvell Technology Interview Question

How would you implement a circular buffer in C?