Ugly brute force gets the two pretty quick:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int compare(const void *a, const void *b)
{
const char *x = a, *y = b;
return *x...