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

/**
 * Calculates basic statistics (min, max, average) for an array of integers
 * @param arr The input array of integers
 * @param size The size of the array
 * @param min Pointer to store the minimum value
 * @param max Pointer to store the maximum value
 * @param avg Pointer to store the average value
 * @return 0 if successful, -1 if array is empty
 */
int calculate_stats(const int arr[], int size, int* min, int* max, double* avg)
{
    if (size <= 0 || arr == NULL || min == NULL || max == NULL || avg == NULL) {
        return -1;
    }

    *min = arr[0];
    *max = arr[0];
    double sum = arr[0];

    for (int i = 1; i < size; i++) {
        if (arr[i] < *min) *min = arr[i];
        if (arr[i] > *max) *max = arr[i];
        sum += arr[i];
    }

    *avg = sum / size;
    return 0;
}

Since this is a simple example that doesn't require reuse or modification, I'll show it directly in our conversation rather than creating an artifact:

#include <stdio.h>

void print_hello(void)
{
    printf("Hello, World!\n");
}

int main()
{
    print_hello();
    return 0;
}
