Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5. short hist[0x100] = {};
  6.  
  7. for (unsigned char *pch = argv[1]; *pch; ++pch) {
  8. ++hist[*pch];
  9. }
  10. for (int ch = 0; ch < 0x100; ++ch) {
  11. if (!hist[ch]) continue;
  12. while (hist[ch]--) putchar(ch);
  13. putchar('\n');
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement