Name

puts

Synopsis

Writes a text line to standard output

#include <stdio.h>
intputs( const char *string );

The puts() function writes the string referenced by its pointer argument to the standard output stream, followed by a newline character ('\n'). The return value is non-negative, or EOF if an error occurs.

Example

See the examples at qsort(), setjmp(), and signal() in this chapter.

Get C in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.