Driver program to test above functions .
int main ( ) { int arr [ ] = { 34 , 2 , 10 , -9 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; gnomeSort ( arr , n ) ; printArray ( arr , n ) ; return ( 0 ) ; }