welibc
A clear, secure, and well documented standard C library
Functions
memset.c File Reference

Defines the memset function. More...

#include <string.h>
Include dependency graph for memset.c:

Go to the source code of this file.

Functions

void * memset (void *s, int c, size_t n)
 Copies the value c into the first n characters of object s. More...
 

Detailed Description

Defines the memset function.

Definition in file memset.c.

Function Documentation

◆ memset()

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

Copies the value c into the first n characters of object s.

Parameters
*sDestination object having its memory set
cValue being written
nNumber of characters to be set

The memset function copies the value c (converted to an unsigned char) into each of the first n characters of the object pointed to by s.

Returns
The value of s

Definition at line 52 of file memset.c.

Referenced by strncpy().

Here is the caller graph for this function: