Copy an array using pointers
#include &lt;stdio.h&gt;


This function doesn't use anything from &lt;stdio.h&gt;, so don't waste the compiler's time by including it.

   void copy(const int *origin, int *location, int n){


I would put the destination argument first, to be consistent with Standard Library functions such as memcpy.  And change n to be a size_t, so it will work with any array.

   int i;
   for(i=0;i&lt;n;i++){


We can reduce the scope of i, by declaring it in the control expression: for (int i = 0;  i &lt; n;  ++i).

     location[i]=origin[i];


We ought to tell the compiler (with restrict) that the arrays don't overlap.

I think it's simpler just to forward to memcpy():
#include &lt;string.h&gt;
void copy(int *restrict dest, int const *restrict origin, size_t count)
{
    memcpy(dest, origin, sizeof *dest * count);
}

But that's so simple that I don't think we want a separate function for it (particularly with such a broad name).