void Function(constint myArray[], int UpdateArray[])
{
for (int t = 0; t < NumElement; t++)
{
UpdateArray[t] = myArray[t];
}
swap(UpdateArray[0], UpdateArray[1]);
}
This will actually affect the original array, no need to return. The const in the first parameter tells us that this array will not be changed. The lack of a const in the second parameter tells us that it can be changed.