Sorting number excluding elements in highest to lowest

#include <stdio.h>

void sortArray(int arr[], int n) {
    int i, j, temp;

    for(i = 0; i < n; i++) {
        for(j = i + 1; j < n; j++) {
            if(arr[i] < arr[j]) {
                temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
            }
        }
    }
}

int main() {
    int arr[] = {5, 10, 3, 8, 1};
    int n = sizeof(arr) / sizeof(arr[0]);

    sortArray(arr, n);

    printf("Sorted array in descending order: ");
    for(int i = 0; i < n; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}

Note: The code above demonstrates how to sort an array of numbers in descending order using the bubble sort algorithm in C. The sortArray function takes an array and its size as parameters and sorts the elements in descending order. The main function initializes an array, calls the sortArray function, and then prints the sorted array in descending order.