Infosys Interview Question

oops in c++