driver program to test
int main ( ) { int arr [ ] = { 0 , 1 , 0 , 1 , 1 , 1 } ; int i , arr_size = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; segregate0and1 ( arr , arr_size ) ; printf ( " Array ▁ after ▁ segregation ▁ " ) ; for ( i = 0 ; i < 6 ; i ++ ) printf ( " % d ▁ " , arr [ i ] ) ; getchar ( ) ; return 0 ; }