1puts(3C) Standard C Library Functions puts(3C)
2
3
4
6 puts, fputs - put a string on a stream
7
9 #include <stdio.h>
10
11 int puts(const char *s);
12
13
14 int fputs(const char *s, FILE *stream);
15
16
18 The puts() function writes the string pointed to by s, followed by a
19 NEWLINE character, to the standard output stream stdout (see Intro(3)).
20 The terminating null byte is not written.
21
22
23 The fputs() function writes the null-terminated string pointed to by s
24 to the named output stream. The terminating null byte is not written.
25
26
27 The st_ctime and st_mtime fields of the file will be marked for update
28 between the successful execution of fputs() and the next successful
29 completion of a call to fflush(3C) or fclose(3C) on the same stream or
30 a call to exit(2) or abort(3C).
31
33 On successful completion, both functions return the number of bytes
34 written; otherwise they return EOF and set errno to indicate the error.
35
37 Refer to fputc(3C).
38
40 Unlike puts(), the fputs() function does not write a NEWLINE character
41 at the end of the string.
42
44 See attributes(5) for descriptions of the following attributes:
45
46
47
48
49 ┌─────────────────────────────┬─────────────────────────────┐
50 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
51 ├─────────────────────────────┼─────────────────────────────┤
52 │Interface Stability │Standard │
53 ├─────────────────────────────┼─────────────────────────────┤
54 │MT-Level │MT-Safe │
55 └─────────────────────────────┴─────────────────────────────┘
56
58 exit(2), write(2), Intro(3), abort(3C), fclose(3C), ferror(3C),
59 fflush(3C), fopen(3C), fputc(3C), printf(3C), stdio(3C), attributes(5),
60 standards(5)
61
62
63
64SunOS 5.11 18 Jun 2003 puts(3C)