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

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

👁 2,713 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 used to copy a specified number of bytes from one memory to another. Whereas, strcpy() function is used to copy the contents of one string into another string.
  • memcpy() function acts on memory rather than value. Whereas, strcpy() function acts on value rather than memory.