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

C Programming Language >   String in C Language >   Introduction to String  

Short Question

6704


Answer:

  • 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.


This Particular section is dedicated to Question & Answer only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.