Infosys interview question

Basic oops Concepts