unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

PUTS(3S)                                                              PUTS(3S)



NAME
       puts, fputs - put a string on a stream

SYNOPSIS
       #include <&lt;stdio.h>&gt;

       puts(s)
       char *s;

       fputs(s, stream)
       char *s;
       FILE *stream;

DESCRIPTION
       puts() writes the null-terminated string pointed to by s, followed by a
       NEWLINE character, to the standard output stream stdout.

       fputs() writes the null-terminated string pointed to by s to the  named
       output stream.

       Neither function writes the terminal null character.

DIAGNOSTICS
       Both routines return EOF on error. This will happen if the routines try
       to write on a file that has not been opened for writing.

NOTES
       puts() appends a NEWLINE while fputs() does not.

SEE ALSO
       ferror(3V), fopen(3V), fread(3S), printf(3V), putc(3S)



                                6 October 1987                        PUTS(3S)