The function reverse_copy is used to copy the elements while reversing their order.
template<class BidirectionalIterator, class OutputIterator> OutputIterator reverse_copy (BidirectionalIterator first,BidirectionalIterator last, OutputIterator result);
The position of the last copied element is returned.