fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main(void) {
  5. uint8_t data[] = {12, 250, 100, 100};
  6. char buf[128], *pos = buf;
  7. for (int i = 0 ; i != 4 ; i++) {
  8. pos += sprintf(pos, "%02x", data[i]);
  9. }
  10. printf("%s\n", buf);
  11. return 0;
  12. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
0cfa6464