Infosys Interview Question

To write a c program