Cognizant interview question

Questions on java, c, oops concepts.