Answers for "copy array of integers in c"

C
0

copy array of integers in c

int * intdup(int const * src, size_t len)
{
   int * p = malloc(len * sizeof(int));
   memcpy(p, src, len * sizeof(int));
   return p;
}
Posted by: Guest on November-25-2020

Code answers related to "C"

Browse Popular Code Answers by Language