Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ puts(3s) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ferror(3s)

fopen(3s)

fread(3s)

gets(3s)

printf(3s)

putc(3s)

puts(3s)

NAME

puts, fputs − put a string on a stream

SYNTAX

#include <stdio.h>

int puts(s)
char *s;

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

DESCRIPTION

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

The fputs subroutine copies the null-terminated string s to the named output stream. 

Neither routine copies the terminal null character. 

RESTRICTIONS

All in the name of backward compatibility, puts appends a newline, but fputs does not. 

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. 

SEE ALSO

ferror(3s), fopen(3s), fread(3s), gets(3s), printf(3s), putc(3s)

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