The memcpy function

Name

memcpy -- Copy a block of memory

Synopsis

#include <string.h>

void *memcpy (void *s1, void *s2, size_t n);

Description

The memcpy function copies n characters from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined.

Returns

The memcpy function returns the value of s1.

See Also

The memmove function

Implementation Notes

The memcpy function is implemented in line using the MOV instruction.