cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Copying the contents from an array to an
Copying the contents from an array to another backwards
Apr 20, 2015 at 9:15am UTC
CVLT
(16)
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
Apr 20, 2015 at 9:39am UTC
Apr 20, 2015 at 9:24am UTC
keskiverto
(10402)
Read this:
http://www.cplusplus.com/reference/algorithm/reverse_copy/
It should give you an idea.
Topic archived. No new replies allowed.