c语言中memcpy函数
memcpy()函数 (memcpy() function)
memcpy() is a library function, which is declared in the “string.h” header file - it is used to copy a block of memory from one location to another (it can also be considered as to copy a string to another).
memcpy()是一个库函数,在“ string.h”头文件中声明-它用于将一个内存块从一个位置复制到另一个位置(也可以视为将字符串复制到另一个位置)。
Syntax of memcpy():
memcpy()的语法:
memcpy(void*str1, const void* str2, size_t n);
It copies n bytes of str2 to str1.
它将str2的 n个字节复制到str1中 。
Example 1) Copying a string to another (all bytes of a string to another)
示例1)将一个字符串复制到另一个(字符串的所有字节到另一个)</