Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAXLINE 128
- int main() {
- char s[MAXLINE];
- int c, i;
- for (i = 0; i < MAXLINE; s[i] = 0, i++)
- ; /*void*/
- s[i] = '\0';
- for (; (c = getchar()) != EOF; s[c] += 1)
- ;/*void*/
- for (i = 0; i < MAXLINE; i++)
- if (s[i] != 0) printf(" %c\t=>\t%d\n", i, s[i]);
- return 0;
- }
Add Comment
Please, Sign In to add comment