Question: C program help please Write a function void reverse_and_print(int *a, int size) in arrays.c which inverts the position of the elements in the array a
C program help please
Write a function void reverse_and_print(int *a, int size) in arrays.c which inverts the position of the elements in the array a (that is, the first elements becomes the last, the second one becomes the second last, and so on) and prints the array invoking print_array. Call reverse_and_print in the main function, after print_array, and verify that it prints the numbers from 8 to 1.
After doing this seperately, make print_array static. Does the program still compile? Why?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
