Cognizant interview question

Questions on puzzles, C,C++