C
---

Simply by using recursion instead of loops. <s>This particular version only works on characters between '0' and 'z', but that's just to keep the stack from overflowing too often.</s> Supporting all of ASCII.

    #include <stdio.h>
    
    void walk(char *s, char m){
        if (*s == '\0') return;
        if (*s == m) putchar(m);
        walk(s+1,m);
    }
    
    void sort(char *s, char m){
      walk(s,m);
      if (m<127) sort(s,m+1);
    }
    
    int main(int argc, char**argv){
      if (argc > 1) {
        printf("%s: ",argv[1]);
        sort(argv[1],1);
        printf("\n");
      }
    }

Sample run:

    $ ./a.out  thingamabob
    thingamabob: aabbghimnot
    $ ./a.out  supercalifragilisticexpalodoucious
    supercalifragilisticexpalodoucious: aaacccdeefgiiiiilllooopprrssstuuux
    $ ./a.out  "The quick red fox jumped over the lazy brown dog"
    The quick red fox jumped over the lazy brown dog:          Tabcdddeeeeefghhijklmnoooopqrrrtuuvwxyz

Too easy, really.