1PUTS(3)                    Linux Programmer's Manual                   PUTS(3)
2
3
4

NAME

6       fputc, fputs, putc, putchar, puts - output of characters and strings
7

SYNOPSIS

9       #include <stdio.h>
10
11       int fputc(int c, FILE *stream);
12       int fputs(const char *s, FILE *stream);
13       int putc(int c, FILE *stream);
14       int putchar(int c);
15       int puts(const char *s);
16

DESCRIPTION

18       fputc() writes the character c, cast to an unsigned char, to stream.
19
20       fputs() writes the string s to stream, without its trailing '\0'.
21
22       putc()  is equivalent to fputc() except that it may be implemented as a
23       macro which evaluates stream more than once.
24
25       putchar(c); is equivalent to putc(c,stdout).
26
27       puts() writes the string s and a trailing newline to stdout.
28
29       Calls to the functions described here can be mixed with each other  and
30       with  calls  to  other  output functions from the stdio library for the
31       same output stream.
32
33       For non-locking counterparts, see unlocked_stdio(3).
34

RETURN VALUE

36       fputc(), putc() and  putchar()  return  the  character  written  as  an
37       unsigned char cast to an int or EOF on error.
38
39       puts()  and  fputs() return a non-negative number on success, or EOF on
40       error.
41

CONFORMING TO

43       C89, C99
44

BUGS

46       It is not advisable to mix calls to output  functions  from  the  stdio
47       library with low-level calls to write() for the file descriptor associā€
48       ated with the same output stream; the results  will  be  undefined  and
49       very probably not what you want.
50

SEE ALSO

52       write(2),   ferror(3),   fopen(3),   fputwc(3),   fputws(3),  fseek(3),
53       fwrite(3), gets(3), putwchar(3), scanf(3), unlocked_stdio(3)
54
55
56
57GNU                               1993-04-04                           PUTS(3)
Impressum