How to copy element from one array to other element of array using pointers?
I am attempting to copy the elements of one dynamically-allocated array (addVec) into another (array) in memory, after passing a pointer to the array from main to a function (changeArray) that assigns values to addVec. My approach thus far: Dynamically allocate an array (array) in main Dynamically allocate another array (addVec) in changeArray() Pass the… Read More How to copy element from one array to other element of array using pointers?