memcpy() function in C with Example
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).
Syntax of memcpy():
memcpy(void*str1, const void* str2, size_t n);
It copies n bytes of str2 to str1.
Example 1) Copying a string to another (all bytes of a string to another)
Output
need an explanation for this answer? contact us directly to get an explanation for this answer