memmove

Copies a specified number of bytes from one object to another.

Format

#include  <string.h>

void *memmove  (void *dest, const void *source,
               size_t size);
Function Variants This function also has variants named _memmove32 and _memmove64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.

Arguments

dest
A pointer to the destination object.
source
A pointer to the source object.
size
The length of the object to be copied.

Description

In DEC C for OpenVMS Systems, memmove and memcpy perform the same function. Programs that require portability should use memmove if the area pointed at by dest could overlap the area pointed at by source.

Return Value
The value of dest

Example

    #include <string.h>
    main()
    {
       char pdest[14] = "hello   there";
       char *psource = "you are there";
    
       memmove(pdest, psource, 7);
       printf("%s\n", pdest);
    }
    

    This example produces the following output:

    you are there
    


Previous Page | Next Page | Table of Contents | Index