memcpy

Copies the number of characters specified by length from one buffer to another buffer.

Library:LibC
Classification:ANSI
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  void *memcpy (
     void         *dst,   
     const void   *src,   
     size_t        length);
  

Parameters

dst

(OUT) Points to a buffer into which to copy the characters.

src

(IN) Points to a buffer containing the characters to be copied.

length

(IN) Specifies the number of characters to copy.

Return Values

Returns a pointer to dst.

Remarks

The memcpy function copies length characters from the buffer pointed to by src into the buffer pointed to by dst. Copying of overlapping objects has undefined results. See memmove to copy objects that overlap.

See Also