Marvell Technology interview question

How would you implement a circular buffer in C?