I am a Java programmer learning C/C++. So I know that Java has a function like System.arraycopy(); to copy an array. I was wondering if there is a function in C or C++ to copy an array. I was only able to find implementation to copy an array by using for loop, pointers,etc. Is there a function that I can use to copy an array?
Since you asked for a C++ solution...
#include <algorithm>
#include <iterator>
const int arr_size = 10;
some_type src[arr_size];
// ...
some_type dest[arr_size];
std::copy(std::begin(src), std::end(src), std::begin(dest));