Sorry,
I must do something silly here. But I do not find my error:
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char *strings[] = { "Zorro", "Alex", "Celine", "Bill", "Forest", "Dexter" };
size_t i, num = sizeof(strings) / sizeof(char *);
qsort(strings, num, sizeof(char *), strcmp);
for(i=0; i<num; i++) printf("%s | ", strings[i]); putchar('\n');
return 0;
}
returns
Dexter | Forest | Bill | Celine | Alex | Zorro |
czerny