Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int *s;
- int i;
- char *buf = malloc(40000);
- s = malloc(130);
- read(0, buf, 39990);
- for (i = 0; i < 26; ++i)
- s[i] = 0;
- for(i = 0; buf[i]; ++i)
- {
- if (buf[i] > 96 || buf[i] < 123)
- ++s[buf[i] - 97];
- }
- for (i = 0; i < 26; ++i)
- printf("%c : >> %d\n", i + 97, s[i]);
- }
Add Comment
Please, Sign In to add comment