fputs -- Write String

Format

#include <stdio.h>
int fputs(const char *string, FILE *stream);

Language Level: ANSI, POSIX, XPG4
fputs copies string to the output stream at the current position. It does not copy the null character (\0) at the end of the string.

Return Value
fputs returns EOF if an error occurs; otherwise, it returns a non-negative value.

Value Meaning
EIOERROR A non-recoverable I/O error occurred.
EIORECERR A recoverable I/O error occurred.
EPUTANDGET An illegal write operation occurred after a read operation.

Example



_cputs -- Write String to Screen
fgets -- Read a String
gets -- Read a Line
puts -- Write a String
<stdio.h>