fputs
raw OCR
Outputs a string on a stream.
Defined in header <stdio.h>
Syntax
#include <stdio.h>
int fputs(const char *s, FILE *stream);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ | ■ |
Remarks
fputs copies the null-terminated string s to the given output stream; it does not append a newline character, and the terminating null character is not copied.
Return value
On successful completion, fputs returns a non-negative value. Otherwise, it returns a value of EOF.
See also
Example
#include <stdio.h>
int main(void)
/* write a string to standard output */
fputsC'Hello world\n", stdout);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/stdio.h/fputs/
· short form /3.1/fputs/