And even if you force the compiler to accept strcmp as the compare function, it would just be comparing the strings addresses (as strings) ! That's because qsort will pass char**'s (as void*'s) but strcmp will treat them as char*'s. It needs to dereference the pointers twice but it's coded to do so only once.
So you need something like this to point strcmp to the right data:
Code:
int comp(const void *a, const void *b) {
return strcmp(*(const char**)a, *(const char**)b);
}
...
char *logic[] = {"nor", "xor", "and", "not", "or"};
qsort(logic, sizeof(logic)/sizeof(*logic), sizeof(*logic), comp);