#include <unistd.h>

int    ft_strcmp(char *str1, char *str2)
{
    while (*str1 && (*str1 == *str2))
    {
        str1++;
        str2++;
    }
    return ((unsigned char)(*str1) - (unsigned char)(*str2));
}

void    ft_sort_params(int argc, char **argv)
{
    int        i;
    int        j;
    char    *tmp;

    i = 1;
    while (i < argc)
    {
        j = i + 1;
        while (j < argc)
        {
            if (ft_strcmp(argv[i], argv[j]) > 0)
            {
                tmp = argv[i];
                argv[i] = argv[j];
                argv[j] = tmp;
            }
            j++;
        }
        i++;
    }
}

int    main(int argc, char **argv)
{
    int    i;
    int    j;

    ft_sort_params(argc, argv);
    i = 1;
    while (i < argc)
    {
        j = 0;
        while (argv[i][j])
        {
            write(1, &argv[i][j], 1);
            j++;
        }
        write(1, "\n", 1);
        i++;
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: