C examples for string.h:memmove
function
<cstring> <string.h>
Move the values of num bytes from source to destination.
void * memmove ( void * destination, const void * source, size_t num );
Parameter | Description |
---|---|
destination | Pointer to the destination array. |
source | Pointer to the source of data. |
num | Number of bytes to move. |
destination is returned.
#include <stdio.h> #include <string.h> int main ()//from w ww. j a v a 2 s . c o m { char str[] = "this is a test."; memmove (str+20,str+15,11); puts (str); return 0; }