DXC Technology Interview Question

basic question from OOPS concept and C++