Question: C++ please Given the function prototype defined below, write the function definition to copy the first array, src, into the second, dest, in reverse order
C++ please
-
Given the function prototype defined below, write the function definition to copy the first array, src, into the second, dest, in reverse order (so the last element of source, is the first element of dest.) You may use index notation (array-style indexing), but will receive +10 pts extra credit if you use the pointer arithmetic-based offset notation instead. If you use both, Ill raise it to +15.
void ReverseArrayByPtr(int *src, int *dest, const int SIZE);
int main()
{
const int SIZE = 7;
int input[SIZE] = { 13, 1, 17, 42, 50, 23, 34 };
int output[SIZE];
ReverseArrayByPtr(input, output, SIZE);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
