puts, _putws
Remonter à Stdio.h - Index
Header File
stdio.h
Category
Console I/O Routines
Prototype
int puts(const char *s);
int _putws(const wchar_t *s);
Description
Outputs a string to stdout.
puts copies the null-terminated string s to the standard output stream stdout and appends a newline character.
Remarque : For Win32 GUI applications, stdout must be redirected.
Return Value
On successful completion, puts returns a nonnegative value. Otherwise, it returns a value of EOF.
Example
#include <stdio.h>
int main(void)
{
char string[] = "This is an example output string\n";
puts(string);
return 0;
}
Portability
POSIX | Win32 | ANSI C | ANSI C++ | |
---|---|---|---|---|
puts |
+ |
+ |
+ |
+ |
_putws |
+ |