Decorate-sort-undecorate idiom: Difference between revisions
→{{header|C}}: Should really store the sorted array.
(Added C) |
(→{{header|C}}: Should really store the sorted array.) |
||
Line 174:
void sortWords(char **words, size_t le, size_t (*f)(const char* s)) {
int i;
char
/* decorate */
Line 188:
printf("[");
for (i = 0; i < le; ++i) {
sprintf(
printf("%s, ",
}
printf("\b\b]\n");
|