>>59
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main(void)
{
FILE *fp = fopen("alpha.txt", "r");
if(fp == NULL){ return -1; }
int count[26], i;
char buf[128];
memset(count, 0, sizeof(count));
while(fgets(buf, sizeof(buf) - 1, fp)){
for(i = 0; i < strlen(buf); ++i){
if(isalpha(buf[i])){
++count[tolower(buf[i]) - 'a'];
}
}
}
fclose(fp);
for(i = 0; i < 26; ++i){
printf("%c: %d\n", i + 'a', count[i]);
}
return 0;
}