Infosys interview question

Basic questions on programming knowledge