DXC Technology Interview Question

about oops concept and c++