Question 7
Back to Exercise
Source and destination overlap. Which function copies the bytes correctly?
- A memcpy
- B memmove Correct
- C strcpy
- D memset
Correct Answer: Option B
memmove works as if copying through a temporary buffer. memcpy and strcpy with overlapping regions are undefined behaviour.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!