Posted By

brm on 01/03/16


Tagged

test


Versions (?)

Print HEX list


 / Published in: C
 

Print list hex character

  1. //print hex list character
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. int c;
  8. printf("DEC HEX CHAR \n");
  9. printf("===== ===== ===== \n");
  10. for(c=0x20; c < 256; c++)
  11. {
  12. switch(c)
  13. {
  14. case 0x0a:
  15. case 0x0b:
  16. case 0x0c:
  17. case 0x0d:
  18. case 0x1b:
  19. printf("%03d %02x\n", c, c);
  20. break;
  21. default:
  22. printf("%03d %02x %c \n", c, c, c);
  23. break;
  24. }
  25. }
  26. return 1;
  27. }

Report this snippet  

You need to login to post a comment.