[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    puts(3S) manual page Table of Contents

Name

puts, fputs - put a string on a stream

Synopsis

#include <stdio.h>

int puts(const char *s);

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

MT-Level

MT-Safe

Description

puts() writes the string pointed to by s, followed by a new-line character, to the standard output stream stdout (see intro(3) ).

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

Neither function writes the terminating null character.

Return Values

On success both routines return the number of characters written; otherwise they return EOF .

See Also

write(2) , intro(3) ), fclose(3S) , ferror(3S) , fopen(3S) , printf(3S) , putc(3S) , stdio(3S)

Notes

puts() appends a new-line character while fputs() does not.


Table of Contents