Cognizant Interview Question

basic oops and c++ programming