Driver program to test above function
int main ( ) { int arr [ ] = { 10 , 2 , -2 , -20 , 10 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int sum = -10 ; subArraySum ( arr , n , sum ) ; return 0 ; }