puts

Description

Writes a string to stdout.

#include <stdio.h>

int puts( const char *string );

string String to be output  

Remarks

The puts function writes string to the standard output stream stdout, replacing the string's terminating null character ('\0') with a newline character (\n) in the output stream.

Return Value

The puts function returns a nonnegative value if it is successful. If the function fails, it returns EOF.

Compatibility

Standards:ANSI, UNIX

16-Bit:DOS, QWIN

32-Bit:DOS32X

See Also

fputs, gets

Example

/* PUTS.C: This program uses puts to write a string to stdout. */

#include <stdio.h>

void main( void )

{

puts( “Hello world from puts!” );

}

Output

Hello world from puts!