Infosys Interview Question

oops questions basic programming basic