Home / Questions / What is the difference between memcpy() and memmove() functions in C?
Explanatory Question

What is the difference between memcpy() and memmove() functions in C?

👁 6,678 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

  • memcpy()  function is is used to copy a specified number of bytes from one memory to another.
  • memmove() function is used to copy a specified number of bytes from one memory to another or to overlap on same memory.
  • Difference between memmove() and memcpy() is, overlap can happen on memmove(). Whereas, memory overlap won’t happen in memcpy() and it should be done in non-destructive way.