fputs()                  Write a String to Stream
 
 #include   <stdio.h>
 
 int        fputs(string,stream);
 char       *string;                     String to be output
 FILE       *stream;                     Pointer to file structure
 
 
    fputs() copies 'string' to the output 'stream' at the current
    position.  The terminating null character ('\0') is not copied.
 
 
    Returns:    The last character output, if successful.  If the input
                string is empty, zero is returned.  A return value of EOF
                indicates an error.
 
  -------------------------------- Example ---------------------------------
 
    The following statements open a file and write a string to it.
 
         #include <stdio.h>
 
         FILE *stream;
 
         main()
         {
             if ((stream = fopen("book.dat","a+")) != NULL) {
                 fputs("End of Chapter 10\n", stream);
             }
         }

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster