#include <stdio.h>
void CopyNumbers(int *first, int *second, unsigned MAXN);
unsigned MAXN = 10; // setting up max numbers of number to be copied.
int main(void)
{
int first[10] = {5, 12, 23, 52, 4, 61, 23, 1, 9, 10, 2};
int second[10];
CopyNumbers(first, second, MAXN);
return 0;
}
void CopyNumbers(int *first, int *second, unsigned MAXN)
{
unsigned temp = MAXN;
while(temp!=0) {
*second++=*first++;
temp--;
}
// print new array
for(temp; temp<MAXN; temp++) printf("second[%d]\n", second[temp]);
}