Capgemini Engineering interview question

basic c/ c++