Copying the contents from an array to another backwards

How would I go about copying the contents from an array into a second array backwards so that it reads 5 4 3 2 1 after the code runs?

int array1[5] = {1, 2, 3, 4, 5};
int array2[5];
Last edited on
Read this: http://www.cplusplus.com/reference/algorithm/reverse_copy/

It should give you an idea.
Topic archived. No new replies allowed.