Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main() {
- char s[] = "alall kdgk ijr rijw,, rjgf. dd";
- const char *delim = " ,.";
- char *saveptr;
- for (char *token = strtok_r(strdup(s), delim, &saveptr); token; token = strtok_r(NULL, delim, &saveptr)) {
- puts(token);
- }
- puts(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement