Capgemini interview question

Basic embedded C required.