#include<stdio.h>
#include<stdlib.h>
#include<string.h>
using namespace std;
char* list[5]={"cattle","car","cabet","cap","canon"};
int compare(const void*a, const void*b)
{
return strcmp(*(char**)a,*(char**)b);
}
int main()
{
qsort((void*)list,5,sizeof(list[0]),compare);
for(int i=0;i<5;i++)
{
printf("%s\n",list[i]);
}
return 0;
}