Pergunta de entrevista da empresa Microsoft

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