write a string to stdout
#include <stdio.h> int puts( const char *buf );
The puts() function writes the character string pointed to by buf to the output stream designated by stdout, and appends a new-line character to the output. The terminating null character is not written.
The puts() function returns a non-zero value if an error occurs; otherwise, it returns zero. When an error has occurred, errno contains a value that indicates the type of error that has been detected.
#include <stdio.h>
void main()
{
FILE *fp;
char buffer[80];
fp = freopen( "file", "r", stdin );
while( gets( buffer ) != NULL ) {
puts( buffer );
}
fclose( fp );
}
ANSI
All (except DOS/PM)