fork(1) download
  1. #include<stdio.h>
  2. #include<cstring>
  3. using namespace std;
  4.  
  5. int main() {
  6. char target[100];
  7. char *t;
  8. //scanf("%s",target);
  9. scanf("%[0-9a-zA-Z ]", target);
  10. printf("%s\n",target);
  11. t = strtok(target," ");
  12. while (t!= NULL)
  13. {
  14. printf("<<%s>>\n", t);
  15. t = strtok (NULL, " ");
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 3460KB
stdin
Testing code
stdout
Testing code
<<Testing>>
<<code>>