Solution Found!
Write a function that reverses the values of an array of floating-point data:void
Chapter 7, Problem P7.5(choose chapter or problem)
Write a function that reverses the values of an array of floating-point data:void reverse(double* a, int size)In the function, use two pointer variables, not integer indexes, to traverse the arrayelements.
Questions & Answers
QUESTION:
Write a function that reverses the values of an array of floating-point data:void reverse(double* a, int size)In the function, use two pointer variables, not integer indexes, to traverse the arrayelements.
ANSWER:Step 1 of 3
The function requires to reverse the values of an array. It can be accomplished by placing one pointer at the start of an array and the other at the end of an array. The elements at these pointers are exchanged and then the first pointer is incremented and the second one is decremented.