fork(27) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main(void) {
  6. char str[] = "Hello there; How are you? / I'm good - End";
  7. char *copy = strdup(str);
  8. char *delim = ";-/";
  9. char *res = strtok( str, delim );
  10. while (res) {
  11. printf("%c\n", copy[res-str+strlen(res)]);
  12. res = strtok( NULL, delim );
  13. }
  14. free(copy);
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 1852KB
stdin
Standard input is empty
stdout
;
/
-