Cognizant Interview Question

Oops and c basics