Driver program to test above
int main ( ) { int mat [ SIZE ] [ SIZE ] = { { 5 , 6 , 1 , 7 } , { -2 , 10 , 8 , -1 } , { 3 , -7 , -9 , 11 } , { 12 , -4 , 2 , 6 } } ; int n = 4 ; cout << " Maximum ▁ Sum ▁ = ▁ " << maxSum ( mat , n ) ; return 0 ; }