Infosys interview question

Not so difficult, should have basic knowledge