Guest User

Untitled

a guest
Jul 16th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #define MAXLINE 128
  3.  
  4. int main() {
  5. char s[MAXLINE];
  6. int c, i;
  7.  
  8. for (i = 0; i < MAXLINE; s[i] = 0, i++)
  9. ; /*void*/
  10. s[i] = '\0';
  11.  
  12. for (; (c = getchar()) != EOF; s[c] += 1)
  13. ;/*void*/
  14.  
  15. for (i = 0; i < MAXLINE; i++)
  16. if (s[i] != 0) printf(" %c\t=>\t%d\n", i, s[i]);
  17.  
  18. return 0;
  19. }
Add Comment
Please, Sign In to add comment