Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

write(2)

fopen(3S)

gets(3S)

putc(3S)

printf(3S)

PUTS(3S)  —  UNIX Programmer’s Manual

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);

DESCRIPTION

Puts copies the null-terminated string s to the standard output stream stdout and appends a newline character. 

Fputs copies the null-terminated string s to the named output stream. No newline character is appended.

Neither routine copies the terminal null character. 

RETURN VALUE

Puts and fputs returns EOF for unsuccessful calls and stores an error code in errno, otherwise it returns zero. 

ERRORS

The underlying function of puts and fputs is write(2).  The error conditions specified for write(2) apply to puts and fputs. 

SEE ALSO

write(2) fopen(3S), gets(3S), putc(3S), printf(3S)

ANSI C  —  August 1, 1992

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