fork(172) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4.  
  5. int main(void) {
  6. char *str = "ab234cid*(s349*(20kd", *p = str;
  7. while (*p) {
  8. if (isdigit(*p)) {
  9. long val = strtol(p, &p, 10);
  10. printf("%ld\n", val);
  11. } else {
  12. p++;
  13. }
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
234
349
20