Driver code
int main ( ) { int A [ ] = { 0 , 1 , 2 , 3 , 0 , 1 , 4 } ; int B [ ] = { 9 , 8 , 1 , 2 , 3 , 4 , 5 } ; int n = sizeof ( A ) / sizeof ( A [ 0 ] ) ; cout << returnMaxSum ( A , B , n ) ; return 0 ; }