Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv)
- {
- short hist[0x100] = {};
- for (unsigned char *pch = argv[1]; *pch; ++pch) {
- ++hist[*pch];
- }
- for (int ch = 0; ch < 0x100; ++ch) {
- if (!hist[ch]) continue;
- while (hist[ch]--) putchar(ch);
- putchar('\n');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement