##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::fputs

From cppreference.com
< cpp‎ | io‎ | c

Defined in header `<cstdio>` |  |
int fputs( const char* str, std::FILE* stream ); |  |

Writes given null-terminated character string to the given output stream.

### [edit] Parameters

str | - | null-terminated character string to be written
stream | - | output stream

### [edit] Return value

Non-negative integer on success, EOF on failure

### [edit] See also

printf fprintf sprintf snprintf (C++11) | prints formatted output to stdout, a file stream or a buffer (function) [edit]
puts | writes a character string to stdout (function) [edit]
fgets | gets a character string from a file stream (function) [edit]
C documentation for fputs

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/io/c/fputs&oldid=67588"