Code:

#include <stdio.h>
int* findSaddlePoints(int **arr, int numOfRow, int numOfCol){
int ans[numOfRow * numOfCol];
int saddlePoint[numOfRow][numOfCol];
int littleRow = arr[0][0];
int maxCol = arr[0][0];
int littleRowPosition;
int maxColPosition;
int m = 0;
for (int i=0; i<numOfRow; i++){
for (int j=0; j<numOfCol; j++){
if(arr[i][j] < littleRow){
littleRow = arr[i][j];
littleRowPosition = j;
}
}
saddlePoint[i][littleRowPosition]++;
}
for (int j=0; j<numOfCol; j++){
for (int i=0; i<numOfRow; i++){
if(arr[i][j] > maxColPosition){
maxCol = arr[i][j];
maxColPosition = i;
}
}
saddlePoint[maxColPosition][j]++;
}
for(int i=0; i<numOfRow; i++){
for(int j=0; i<numOfCol; j++){
if(saddlePoint[i][j] == 2){
ans[m] = saddlePoint[i][j];
m++;
}
}
}
return ans;
}
int main(void){
int arr[6][8]={{11,33,55,16,77,99,10,40},
{29,87,65,20,45,60,90,76},{50,53,78,44,60,88,77,81},
{46,72,71,23,88,26,15,21},{65,83,23,36,49,57,32,14},
{40,22,34,19,54,37,26,93}};
int answer[sizeof(arr[0])/sizeof(arr[0][0]) * sizeof(arr)/sizeof(arr[0])];
answer = &findSaddlePoints(arr, sizeof(arr[0])/sizeof(arr[0][0]), sizeof(arr)/sizeof(arr[0]));
return 0;
}