Well people, I got this doubt when reading about the memmov function in href=
http://www.cplusplus.com/reference/clibrary/cstring/memmove.html
. The prototype is given as
void * memmove ( void * destination, const void * source, size_t num ); /*source is a pointer to a constant location. Hence the data pointed to by 'source' cannot be changed. */
Now consider the following statement
"Copying takes place as if an intermediate buffer was used, allowing the destination and source to overlap."
Dont you think the prototype given and this statement are mutually conflicting since if the source and dest overlap and it is guaranteed that the dest will finally contain the data pointed to by dest, source will finally contain data which is not the same which it had previously. What do you guys say?
Even in case memcpy, source is const void*. Hence in case of overlap it can choose not to change the source content since the behavior is undefined(What else can it do?) for memcpy.