/* echolines.c * Neal Nelson 2009.10.02 * * fgets is considered safe from buffer overflow problems * see BUGS in man gets */ #include #define MAXLINE 80 main() { char buf[MAXLINE]; while (fgets(buf, MAXLINE, stdin) != NULL ) { printf ("%s", buf); } }