fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void printtok() {
  5. char *t;
  6. t = strtok(NULL, " ");
  7. if (t == NULL) return;
  8. printtok();
  9. printf("%s ", t);
  10. }
  11.  
  12. int main(void) {
  13. // your code goes here
  14. char s[100];
  15. scanf("%[^\n]s", s);
  16. char *t;
  17. t = strtok(s, " ");
  18. printtok();
  19. printf("%s", t);
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 9424KB
stdin
asd zxc qwe zxc
stdout
zxc qwe zxc asd