The conversation between human and AI assistant.
How do I find max/min in arrays using recursion in C?
Sure, here it is:

int findMax(int arr[], int n) {
    if (n == 1)
        return arr[0];
    return max(arr[n-1], findMax(arr, n-1));
}

int findMin(int arr[], int n) {
    if (n == 1)
        return arr[0];
    return min(arr[n-1], findMin(arr, n-1));
}
I see. Your code looks fine. However, you forgot to include the headers for the min() and max() functions. You need to add #include <stdio.h> and #include <stdlib.h> at the beginning of your code.