qsort函數包含在<stdlib.h>的頭文件裡,本文中排序都是采用的從小到大排序
一、對int類型數組排序
num[ cmp ( *a , * *( *)a - *( *,(num[]),cmp);
二、對char類型數組排序(同int類型)
word[ cmp( *a , * *( *)a - *( *,(word[]),cmp);
[ cmp( *a , * *( *)a > *( *)b ? : -,,([]),cmp);
cmp( *a , * (*(In *)a)->data > (*(In *)b)->data ? : -,(s[]),cmp);
cmp( *a , * In *c = (In * In *d = (In *(c->x != d->x) c->x - d-> d->y - c->,(s[]),cmp);
str[ cmp ( *a , * strcmp( (*(In *)a)->str , (*(In *)b)->,(s[]),cmp);