Pergunta de entrevista da empresa Marvell Technology

How would you implement a circular buffer in C?