1memset(3) Library Functions Manual memset(3)
2
3
4
6 memset - fill memory with a constant byte
7
9 Standard C library (libc, -lc)
10
12 #include <string.h>
13
14 void *memset(void s[.n], int c, size_t n);
15
17 The memset() function fills the first n bytes of the memory area
18 pointed to by s with the constant byte c.
19
21 The memset() function returns a pointer to the memory area s.
22
24 For an explanation of the terms used in this section, see at‐
25 tributes(7).
26
27 ┌────────────────────────────────────────────┬───────────────┬─────────┐
28 │Interface │ Attribute │ Value │
29 ├────────────────────────────────────────────┼───────────────┼─────────┤
30 │memset() │ Thread safety │ MT-Safe │
31 └────────────────────────────────────────────┴───────────────┴─────────┘
32
34 C11, POSIX.1-2008.
35
37 POSIX.1-2001, C89, SVr4, 4.3BSD.
38
40 bstring(3), bzero(3), swab(3), wmemset(3)
41
42
43
44Linux man-pages 6.04 2023-03-30 memset(3)