Capgemini interview question

Basic aptitude and c