C program to swap first element with last, second to second last and so on (reversing elements)
Given an array of integer elements and we have to reverse elements (like, swapping of first element with last, second element with second last and so on) using C program.
Example:
Input:
Array elements are: 10, 20, 30, 40, 50
Output:
Array elements after swapping (reversing):
50, 40, 30, 20, 10
Program to reverse array elements (by swapping first element to last, second to second last and so on) in C
Output
need an explanation for this answer? contact us directly to get an explanation for this answer