Namespaces
Variants
Views
Actions

puts

From cppreference.com
< c‎ | io
Revision as of 22:36, 31 May 2013 by P12bot (Talk | contribs)

 
 
File input/output


Functions
File access
Direct input/output
Unformatted input/output
(until C11)(since C11)
puts
(C95)(C95)
(C95)
(C95)(C95)
(C95)
(C95)
Formatted input
Formatted output
File positioning
Error handling
Operations on files
 
Defined in header <stdio.h>
int puts( char *str );

Writes character string str and a newline to stdout

Contents

Parameters

str - character string to be written

Return value

non-negative number on success or EOF otherwise

Example

#include <stdio.h>
 
int main(int argc, char** argv)
{
    puts("Hello World");
    return 0;
}

Output:

Hello World

See also

writes a character string to a file stream
(function) [edit]
prints formatted output to stdout, a file stream or a buffer
(function) [edit]