Guest User

Untitled

a guest
Sep 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. root#0000:~# ./charcode
  2. ł
  3. Got char c: C5
  4. Got char c: 82
  5. Got char c: 0A
  6. ^C
  7. root#0000:~#
  8.  
  9. root#0000:~# echo -e 'xC5x82'
  10. ł
  11. root#0000:~#
  12.  
  13. #include <stdio.h>
  14.  
  15. int main()
  16. {
  17. int c;
  18.  
  19. while((c=getchar())!=EOF) {
  20. printf("Got char c: %02Xn", (unsigned char)c);
  21. }
  22.  
  23. return 0;
  24. }
Add Comment
Please, Sign In to add comment