Procedure :
1.Take an array.
2.Then by default function reverse(array_name, array_name + size) .
reverse(array_name, array_name + size) function exits in algorithm.h header file.
3.Now print the array.
N.B Here we use new and delete for dynamic memory allocation.
C++ implementation :
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int *arr = new int[n];
for(int i=0; i<n; i++) cin>>arr[i];
reverse(arr, arr+n);
for(int i=0; i<n; i++) cout<<arr[i]<<" ";
delete[] arr;
return 0;
}