Question d’entretien chez Microsoft

How does a rotary buffer work? Implement it in C.