Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

memset - initialize memory area

&pagelevel(4)&pagelevel

Syntax

#include <string.h>

void *memset(void *s, int c, size_t n);

 

 

Description

memset() copies the value of character c into each of the first n bytes of the memory area
to which s points.

s is a pointer to the memory area to be initialized with character c.

c is the EBCDIC value of the character to be copied.

n is an integer value that specifies the number of bytes in s to be initialized with character c.

Return val.

Pointer to memory area s

 

Notes

This function is suitable for processing character arrays, which, in contrast to strings, need
not be terminated by the null byte (\0).

memset() does not check whether data in result area s is in danger of being overwritten.

See also

memcpy(), memchr(), memcmp(), memcpy(), string.h.