If destination and source are the same, what does memmove do?
That's really going to be implementation-specific. It would be good practice to do so, sure, but it really depends which implementation you mean.
It's going to work either way, but presumably a suitably clever implementation would check for overlapping segments (and particularly for the case where source == dest
) and deal with it appropriately.