fork(1) download
  1. #include <string.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include <ctype.h>
  5.  
  6. int main()
  7. {
  8. char *p,napis[]="abcd123efgh456ijkl789";
  9. int tb[100],i,count=0;
  10. for(p=napis;*p;++p) if(isdigit(*p)) tb[count++]=strtol(p,&p,10);
  11. for(i=0;i<count;++i) printf("%d\n",tb[i]);
  12. return 0;
  13. }
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
123
456
789