2009-05-17から1日間の記事一覧
標準ライブラリのqsortの使い方が少し分かったので、文字列の並べ替えもやってみた。 #include <stdio.h> #include <stdlib.h> #include <time.h> #define NUM 10 char str[NUM][16]; void show(void) { int i; for (i = 0; i < NUM; i++) { printf("%s\n",str[i]); } } int cmp (const </time.h></stdlib.h></stdio.h>…