fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main (void)
  5. {
  6. static char buf[128];
  7. fgets(buf,128,stdin);
  8.  
  9. char *p;
  10. char *p1;
  11.  
  12. p=buf;
  13.  
  14. while(*p){
  15.  
  16. while (*p && isspace((int)*p)) {
  17. printf("*p++=%c\n",*p);
  18. *p++='\0';
  19. }
  20. printf("*p1=%s\n",p1);
  21. p1=p;
  22.  
  23. while (*p && !isspace((int)*p)) {
  24. printf("*p=%c\n",*p);
  25. p++;
  26.  
  27.  
  28. }
  29. }
  30.  
  31. }
  32.  
  33.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
Standard output is empty