Driver code
int main ( ) { int matrix [ M ] [ N ] = { { 1 , 3 , 5 , 7 } , { 10 , 11 , 16 , 20 } , { 23 , 30 , 34 , 50 } } ; int K = 3 ; if ( searchMatrix ( matrix , K ) ) cout << " Found " << endl ; else cout << " Not ▁ found " << endl ; }