Infosys Interview Question

to write a simple code in c