adspace
What is the difference between the functions memmove() and memcpy()?
Answer Posted / Jyoti Chaudhary
Both memmove() and memcpy() are used to copy memory blocks in C++. However, their behavior differs when the source and destination memory blocks overlap. memmove() can handle this case by ensuring that memory is copied safely, while memcpy() does not check for overlapping blocks, which might lead to undefined behavior.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers