Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
memmove - copy bytes in memory with overlapping areas
&pagelevel(4)&pagelevel
Syntax | #include <string.h> void *memmove(void *s1, const void *s2, size_t n); |
Description | memmove() copies the first n bytes of the memory area to which s2 points into the memory area pointed to by s1.
memmove() first copies the n bytes to a temporary field that does not overlap memory areas s1 and s2 and then copies the bytes from that field to the memory area s1.
s1 is a pointer to the memory area to which the bytes are be copied. s2 is a pointer to the memory area from which the first n bytes are to be copied. n is an integer value that specifies the number of bytes in s2 to be copied. |
Return val. | Pointer to memory area s1 |
|
| if successful. |
Notes | This function is suitable for processing character arrays, which, in contrast to strings, need not be terminated with the null byte (\0). memmove() also works with memory areas that overlap; memcpy() , by contrast, does not.
|
See also | memcpy() , string.h .
|