fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char *ptr="ff:ff:fe:ff";
  6. for (;;) {
  7. int res = strtol(ptr, &ptr, 16);
  8. printf("%x\n", res);
  9. if (*ptr == ':') {
  10. ptr++;
  11. } else {
  12. break;
  13. }
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 1788KB
stdin
Standard input is empty
stdout
ff
ff
fe
ff