memcpy - Copy memory area


void memcpy(void *dst, void *src, int16 size);

The memcpy() function copies size bytes from memory area src to memory area dst. The memory areas must not overlap.


  • dst: Pointer to the destination array where the content is to be copied.
  • src: Pointer to the source of data to be copied.
  • size: Number of bytes to copy.

Return Value

No value is returned.


Example #1 memset() example

const uint8 src_arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
init {
    uint8 dst_arr[9];
    memcpy(&dst_arr, &src_arr, sizeof(dst_arr));
    // dst_arr[] now have the same contents of src_arr[]

See Also

t2/memcpy.txt · Last modified: 2016/11/12 10:16 by J2Kbr