How to Sort a String with Number by Ascending
As Michel Keijzers points out, qsort is the standard sorting function
from the libc. Now, since your numbers can start with either two or
three digits, you can not sort them lexicographically, because if you
did so 111 would sort before 82. Instead I suggest to:


parse the start of the strings as integers
compare the integers
if the integers are equal, then sort the strings lexicographically.


The simplest way to parse the strings into integers is atoi(). Unlike
functions like strtol(), atoi() does no error checking, but it is
good enough if you know for sure that the strings have the right format.

Here is the comparison function:

int compare(const void *a, const void *b)
{
    // Get the strings.
    const char *sa = *(const char * const *) a;
    const char *sb = *(const char * const *) b;

    // First, compare the numeric prefixes.
    int ia = atoi(sa);
    int ib = atoi(sb);
    if (ia &lt; ib) return -1;
    if (ia &gt; ib) return +1;

    // If equal, compare the strings lexicographically.
    return strcmp(sa, sb);
}


And here is an example on how to use it:

#define STR_COUNT 3
const char *strings[STR_COUNT] = { "112:AAAA", "82:FFFF", "111:EEEE" };
qsort(strings, STR_COUNT, sizeof strings[0], compare);


Now the array of strings is sorted as ("82:FFFF", "111:EEEE",
"112:AAAA").