Infosys interview question

Technical Question related to programming language (very basic)