Have no idea how to solve this: need to find maximum element in structure. I'm calling function but it doesn't work as expected

```
#include <stdio.h>
#include <stdlib.h>

struct str{
int num[5];
};

int main()
{
struct str arr_nums[5];

for(int i=0; i<5; i++){ 
printf("Enter number: ");
scanf("%d", &arr_nums[i].num);
}

int res = max_num(arr_nums);//calling function 
printf("Max num: %d", res);//but it prints out fantastic numbers, not related to my code
return 0;
}

int max_num(struct str*arr_nums[5]){//function that should find max
int MAX = -1;
for(int i=0; i<5; i++){
    if(MAX>arr_nums[i])
    {MAX=arr_nums[i];}
}
return MAX;
}

```