IBM interview question

Write a Code to implement circular buffer