Skip to the content of the web site.

Project W.9: Reverse

The reverse function reverses the entries of the array in place.

Integer implementation

void reverse( int array[], std::size_t capacity );

Templated implementation

template <typename T>
void reverse( T array[], std::size_t capacity );