Given an array ar of n integers, reverse the elements of the array by using the concept of pointers.
Enter a number N and take N more inputs in array ar.
Output Format:
Display values of the reversed array (separated by space)
1<= n <=10^6
-10^6<= ar[i] <= 10^6
Note
You only have to complete the definition of the given function named "reverse". Input has already been taken for you.
4
1
2
3
4
4 3 2 1