Driver code
int main ( ) { int a [ ] = { 5 , 1 , 4 , 2 , 8 , 0 , 2 } ; int n = sizeof ( a ) / sizeof ( a [ 0 ] ) ; CocktailSort ( a , n ) ; printf ( " Sorted ▁ array ▁ : STRNEWLINE " ) ; printArray ( a , n ) ; return 0 ; }