7 printf("Hello! Welcome to EchoHelper.c\n");
8 while(fgets(buf,sizeof(buf),stdin) != NULL) {
9 for(p=buf;*p && *p!='\n' && *p!='\r';p++);
11 fprintf(stdout,"You said: %s\n",buf);
13 fprintf(stderr,"They said: %s\n",buf);
14 if(strcmp(buf,"exit")==0) break;