Capgemini interview question

Basic c c++