Writes a string to a stream.
#include <stdio.h>
int fputs( const char *string, FILE *stream );
string | String to be output | |
stream | Pointer to FILE structure |
The fputs function copies string to the output stream at the current position. The terminating null character ('\0') is not copied.
The fputs function returns a nonnegative value if it is successful. If an error occurs, it returns EOF.
Standards:ANSI, UNIX
16-Bit:DOS, QWIN, WIN, WIN DLL
32-Bit:DOS32X
fgets, gets, puts
/* FPUTS.C: This program uses fputs to write a single line to the
* stdout stream.
*/
#include <stdio.h>
void main( void )
{
fputs( "Hello world from fputs.\n", stdout );
}
Hello world from fputs.