Guest User

Untitled

a guest
Mar 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #define SPLITME "HELLO.$boo"
  2. #define SPLITON ".$"
  3.  
  4. #include <string.h>
  5. #include <stdio.h>
  6.  
  7. int
  8. main()
  9. {
  10. char *first, *second, *saveptr;
  11.  
  12. first = second = NULL;
  13.  
  14. first = strtok_r(SPLITME, SPLITON, &saveptr);
  15. second = strtok_r(NULL, SPLITON, &saveptr);
  16.  
  17. printf("The first string is %s and the second is %s\n", first, second);
  18.  
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment