Infosys interview question

To write a c program