I wrote my function in C++, using a std::vector instead of a C array. The reversal is performed in-place using iterators.
template
void reverse(std::vector& v) {
if (v.size() > 1)
for (auto i1 = v.begin(), i2 = v.end() - 1; i1 < i2; ++i1, --i2)
std::iter_swap(i1, i2);
}