Capgemini Engineering interview question

Given a program to reverse an array online.