fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. // your code goes here
  6. char data[]= {0xc2,0x06,0x08,0x38,0xc8};
  7. int size = 5;
  8. char buff;
  9. char lb;
  10. char hb;
  11.  
  12. hb = data[0]>>4;
  13.  
  14. if(hb >=0 && hb <= 9)
  15. {
  16. buff = hb + 0x30;
  17. }
  18. else
  19. {
  20. printf("%x\n",hb);
  21. buff = hb - 15 + 0x61;
  22. }
  23.  
  24. printf("%c",buff);
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0s 5372KB
stdin
Standard input is empty
stdout
fffffffc
N