Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

write(2)

intro(3)

fclose(3S)

ferror(3S)

fopen(3S)

printf(3S)

putc(3S)

stdio(3S)

puts(3S)

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. 

SunOS 5.5.1  —  Last change: 22 Jan 1993

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