Cognizant interview question

Simple questions to test your logic.