#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ char str2[40]; char str[] = "Gazing through the window at the world outside Wondering will mother earth survive Hoping that mankind will stop abusing her, sometime After all there's only just the two of u here we are still fighting for our lives Watching all of history repeat itself, time after time"; char *p,*z,*pc = &str[0]; int i=1,c=0,t; while(c < strlen(str)) { for(; c < i*40; i++) { if(str[i] == ' ' || str[i] == '\n') { p = &str[i]; } } for(; pc!=p; pc++) { for(t=0; t < strlen(str2); t++) { z = strchr(str2,'\0'); *z = *pc; z++; *z = '\0'; } } i++; printf("%s",str2); } return 0;}