Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fputs(3S) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ferror(3S)

fopen(3S)

fread(3S)

printf(3S)

putc(3S)

PUTS(3S)

NAME

puts, fputs − put a string on a stream

SYNOPSIS

#include <stdio.h>

int puts (s)
char ∗s;

int fputs (s, stream)
char ∗s;
FILE ∗stream;

DESCRIPTION

Puts writes the null-terminated string pointed to by s, followed by a new-line 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 terminating null character.  Note that puts appends a new-line character, but fputs does not. 

RETURN VALUE

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.  A non-negative number is returned on success. 

SEE ALSO

ferror(3S), fopen(3S), fread(3S), printf(3S), putc(3S). 

NOTES

Puts appends a new-line character while fputs does not. 

STANDARDS CONFORMANCE

puts: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1, ANSI C

fputs: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1, ANSI C

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026