Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define SPLITME "HELLO.$boo"
- #define SPLITON ".$"
- #include <string.h>
- #include <stdio.h>
- int
- main()
- {
- char *first, *second, *saveptr;
- first = second = NULL;
- first = strtok_r(SPLITME, SPLITON, &saveptr);
- second = strtok_r(NULL, SPLITON, &saveptr);
- printf("The first string is %s and the second is %s\n", first, second);
- return 0;
- }
Add Comment
Please, Sign In to add comment