>>136
初仕事。出来るだけ君の要望に沿ってみた。
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>

void input(char *fi, int *b){
    int c;
    FILE *fp;
    if (NULL == (fp = fopen(fi, "r"))){
        fprintf(stderr, "error:file open\[%s\].\n", fi);
        exit(1);
    }
    while (EOF != (c = getc(fp))) if (isalpha(c)) b[toupper(c) - 'A']++;
    fclose(fp);
}

void sort(char *a, int *b){
    int i, j, tmpi;
    char tmpc;
    for (i = 0; i < 25; i++)
        for (j = i + 1; j < 26; j++)
            if (b[i] < b[j]){
                tmpi = b[i];
                b[i] = b[j];
                b[j] = tmpi;
                tmpc = a[i];
                a[i] = a[j];
                a[j] = tmpc;
            }
}