HP 3000 Manuals

memcpy [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

memcpy 

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

Syntax 

     #include <string.h>
     void *memcpy(void *s1, const void *s2, size_t n);

Parameters 

s1            A pointer to the target object.

s2            A pointer to the source object.

n             The number of characters to copy.

Return Values 

x             The value of s1.

Description 

The memcpy function copies n characters from the object pointed to by s2 
to the object pointed to by s1.  Unlike the strcpy function, the memcpy
function does not stop when a null character is encountered.  Use
memmove() rather than memcpy() if the source and destination objects
might overlap in memory.

See Also 

memmove(), strcpy(), memchr(), memset(), ANSI C 4.11.2.1



MPE/iX 5.0 Documentation