Write a c function that swaps the first and the last elements of chunks in an array. For an array consisting of 9 elements and assuming a chunk of size 3: Array elements: XXXXXXXXXX The output would...


Write a c function that swaps the first and the last elements of chunks in an array. For an array consisting of 9 elements and assuming a chunk of size 3:



Array elements: 1 2 3 4 5 6 7 8 9


The output would be, 3 2 1 6 5 4 9 8 7



Inverting here means swapping the last and the first element of a chunk.



Note: Size of array should always be multiple of chunk size. User will enter the size of array and chunk



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here