Digitize interview question

c++ code to sum two halves of an array