Infosys Interview Question

Write a program in c language