Meta interview question

Write a ring buffer in C to init and write and read