Cognizant interview question

Basic Coding questions and questions based on oops