Driver program to test above functions
int main ( ) { int k = 3 ; int arr [ ] = { 2 , 6 , 3 , 12 , 56 , 8 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; sortK ( arr , n , k ) ; cout << " Following ▁ is ▁ sorted ▁ array STRNEWLINE " ; printArray ( arr , n ) ; return 0 ; }