摘要: 1.qsort排序/* qsort example */#include <stdio.h>#include <stdlib.h>int values[] = { 40, 10, 100, 90, 20, 25 };int compare (const void * a, const void * b){ return ( *(int*)a - *(int*)b );}int main (){ int n; qsort (values, 6, sizeof(int), compare); for (n=0; n<6; n++) printf ("%d & 阅读全文
posted @ 2011-11-20 11:16 Socrates 阅读(276) 评论(0) 推荐(0) 编辑