fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. char input[256];
  7.  
  8. while (fgets(input, 256, stdin) != NULL && *input != '\n')
  9. {
  10. char *t = strtok(input, " \n");
  11. while (t != NULL)
  12. {
  13. printf("%s ", t);
  14. t = strtok(NULL, " \n");
  15. }
  16. fputc('\n', stdout);
  17. }
  18. }
  19.  
Success #stdin #stdout 0s 9424KB
stdin
324 A 1 D F
829 Z 3 3 F G
1234 C 3 F G
234 D 2 3
stdout
324 A 1 D F 
829 Z 3 3 F G 
1234 C 3 F G 
234 D 2 3