Copying array into another array?

have this code that will copy the elements from an array to another array. This code is from the book but i'm not clearly understanding it. Importantly, the while part where the context illustrates that index <startingpos+numberofelements. What is it adding that??

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void copyarray (int list[],int startingpos, int list2[],int tar, int numberelements)

{
	int index;
	index=startingpos;

while (index < startingpos+numberelements)
{
	list2[index]=list[tar];
	tar++;

	index++;
}


}
Double knock knock for this too :D
Topic archived. No new replies allowed.