#include int main(void) { char c; int i; long int counts[256]; // Initializing counters for(i=0; i<256; i++){ counts[i]=0; }; // Reading characters from stdin and incrementing counter while(scanf("%c",&c)!=EOF){ ++counts[c]; // printf("#%c = %i has %ld occurences \n",c, c, ++counts[c]); }; // Printing output for(i=0;i<32;i++){ printf(" #%5i ** has %ld \toccurences in file\n", i, counts[i]); };;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; for(i=32;i<126;i++){ printf(" #%5i %c has %ld \toccurences in file\n", i, i, counts[i]); }; for(i=126;i<256;i++){ printf(" #%5i ** has %ld \toccurences in file\n", i, counts[i]); }; return 0; }