#include void main() { FILE *fp; char buffer[80]; fp = freopen( "file", "r", stdin ); while( gets( buffer ) != NULL ) { puts( buffer ); } fclose( fp ); }