Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

memcpy - Copy memory area

&pagelevel(4)&pagelevel

Definition

#include <string.h>

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

memcpy copies the first n bytes of the memory area to which s2 points into the memory area
pointed to by s1.

Return val.

Notes

Pointer to the memory area s1.

This function is suitable for processing character arrays containing the null byte (\0), since
memcpy does not interpret the null byte as the ’end of text’.

memcpy does not check whether data in result area s1 is in danger of being overwritten.

The behavior is undefined if memory areas overlap.

See also

memchr, memcmp, memset