strtok.c 428 B

123456789101112131415
  1. #include <string.h>
  2. #include <stdio.h>
  3. int main(int argc, char* argv[]) {
  4. char source[] = "I'd just like to interject for a moment. What you're referring to as Linux, "
  5. "is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux.\n";
  6. char* token = strtok(source, " ");
  7. while (token) {
  8. printf("%s_", token);
  9. token = strtok(NULL, " ");
  10. }
  11. return 0;
  12. }