
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <stdio.h>
int fputs( const char *buf, FILE *fp );
Description:
The fputs function writes the character string pointed to by buf to the
output stream designated by fp. The terminating null character is not
written.
Returns:
The fputs function returns EOF if an error occurs otherwise it returns a
non-negative value. When an error has occurred, errno contains a value
indicating the type of error that has been detected.
See Also:
fopen, fputc, putc, puts
Example:
#include <stdio.h>
void main()
{
FILE *fp;
char buffer[80];
fp = fopen( "file", "r" );
if( fp != NULL ) {
while( fgets( buffer, 80, fp ) != NULL )
fputs( buffer, stdout );
fclose( fp );
}
}
Classification:
ANSI
Systems:
All
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson