HP C/iX Library Reference Manual (30026-90004)

258 Chapter5
HP C/iX Library Function Descriptions
memset
memset
Initializes an object with a supplied character value.
Syntax
#include <string.h>
void *memset(void *
s
, int
c
, size_t
n
);
Parameters
s
A pointer to an object.
c
The value to be duplicated throughout the object that
s
points to.
n
The number of characters in object
s
to be filled with the value
c
.
Return Values
x The value of
s
.
Description
The memset function stores
n
copies of the character
c
into the object pointed to by
s
. The
value of
c
is converted to an unsigned char before it is stored.
See Also
memchr(), memcmp(), memcpy(), memmove(), ANSI C 4.11.6.1