cplusplus.com > reference > cstdio > puts
puts
<stdio.h>
  cplusplus.com  
int  puts (const char * string );

Output a string to stdout.
  Copies the string to standard output stream (stdout) and appends a new line character (\n).

Parameters.

string
Null-terminated string to be outputed.

Return Value.
  On success, a non-negative value is returned.
  On error EOF value is returned.

Example.

/* puts example : hello world! */
#include <stdio.h>

int main ()
{
  char string [] = "Hello world!";
  puts (string);
}

See also.
  putc, gets, printf


© The C++ Resources Network, 2000