IBM interview question

reverse an array in c++.