Driver program to test above functions
int main ( ) { int arr [ ] = { 3 , 2 , 0 , 1 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Given ▁ array ▁ is ▁ STRNEWLINE " ; printArr ( arr , n ) ; rearrange ( arr , n ) ; cout << " Modified ▁ array ▁ is ▁ STRNEWLINE " ; printArr ( arr , n ) ; return 0 ; }