Below in change_array function I am trying to take an existing already initialized array and assign it new values. I am trying to experiment whether the array alterations will behave in a pass by value or pass by address manner but the error below has stopped progress. I just need to know how to change the values all at once instead of one at a time. Thx
But really, with an array, if you want one variable to sometimes means that array and sometimes mean this array, consider using a pointer to the first element of the array:
1 2 3 4 5 6
int* pointer;
int array1[5] = {3,2,5,6,7};
pointer = array1;
int array2[5] = {8,6,7,4,1};
pointer = array2;