[Solved] : Question 133996

We know how to reverse an array using pointers. Your task is to partially reverse an array using pointer. Follow the given steps to solve the problem.
a) Take N integer numbers in an array. (3<=N<=25).
b) Assign a pointer to point to the 0th index element of the array.
c) Using pointers, swap elements accordingly to reverse the array (swap 1st element

with n-1th element. 2nd element with n-2th element and so on).
d) But as it is a partial reverse process, you need to check some conditions before swapping. If the numbers to be swapped are M and N respectively, do not swap them if the following condition becomes true.
i. M+N> M*N
Sample Input-Output: Input Output
1234 1324
50321 50321

Expert Answer

Answer to : Question 133996

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?