Driver code
int main ( ) { int arr [ ] = { 10 , 6 , 15 , 20 , 30 , 5 , 7 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int * low = ( int * ) malloc ( sizeof ( int ) * n ) ; constructLowerArray ( arr , low , n ) ; cout << " Following ▁ is ▁ the ▁ constructed ▁ smaller ▁ count ▁ array " ; printArray ( low , n ) ; return 0 ; }