fputs


fputs

Writes a string to a file

 #include <stdio.h> int fputs ( const char * restrict string , FILE * restrict fp  ); 

The fputs( ) function writes a string to the file specified by the FILE pointer argument. The string is written without the terminator character ('\0'). If successful, fputs( ) returns a value greater than or equal to zero. A return value of EOF indicates that an error occurred.

Example

See the examples at fclose( ) and fflush( ) in this chapter.

See Also

fgets( ), fputws( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net