Infosys interview question

Some questions on programming basics