Cognizant Interview Question

Questions from oops and databases.