memset

Sets a specified number of bytes in a given object to a given value.

Format

#include  <string.h>

void *memset  (void *s, int value, size_t
              size);
Function Variants This function also has variants named _memset32 and _memset64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.

Arguments

s
An array pointer.
value
The value to be placed in s.
size
The number of bytes to be placed in s.

Description

This function copies value (converted to an unsigned char) into each of the first size characters of the object pointed to by s.

This function returns s. It does not check for the overflow of the receiving memory area pointed to by s.

Return Value
The value of s


Previous Page | Next Page | Table of Contents | Index