Names specified here
Name Description Notes Source Availability
fputs() Output line of characters (·) <stdio.h> C89 C90 C95 C99 C11
fputws() Output line of wide characters (·) <wchar.h> C95 C99 C11
puts() Output line of characters to standard output (·) <stdio.h> C89 C90 C95 C99 C11
#include <stdio.h>
int fputs(const char *s, FILE *str);
int puts(const char *s);

#include <wchar.h>
int fputws(const wchar_t *s, FILE *str);

fputs, puts and fputws write a null-terminated string s to a stream, excluding the null character. fputs and puts write to a byte-oriented stream, and fputws writes to a wide-oriented stream. fputs and fputws write to str, while puts writes to stdout, and appends a newline character.

The functions return EOF if a write error occurs. fputws also fails if there's an encoding error. Otherwise, the functions return a non-negative value.


CHaR
Sitemap Supported
Site format updated 2024-06-05T22:37:07.391+0000
Data updated 1970-01-01T00:00:00.000+0000
Page updated 2023-10-04T20:24:03.205+0000