Driver code
int main ( ) { int arr [ ] = { 1 , 2 , 3 , 4 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int * b ; b = solve ( arr , n ) ; for ( int i = 0 ; i < n ; i ++ ) cout << b [ i ] << " ▁ " ; }