fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. static char *buf,*p;
  7.  
  8. p = (char*)malloc(20*sizeof(char));
  9.  
  10. buf = p;
  11.  
  12. scanf("%s",buf);
  13.  
  14. while(buf[0] != '\0')
  15. printf("\n%s\n",buf++);
  16.  
  17. free(p);
  18. buf=NULL;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 1856KB
stdin
Hello!
stdout
Hello!

ello!

llo!

lo!

o!

!