Infosys interview question

Write a program in c language