Memory Copy

This function copies an area of memory. This function is passed two blocks of memory, a target and a source, defined as type char * in C. It is also passed the length of the block to copy.

The copying operation is simple if the source and target do not overlap. However, if they do overlap, the copy has to be done in the correct direction—either starting at the beginning and working forward, or starting at the end and working backward—depending on how they overlap. Otherwise, bytes of data will be copied into some memory locations before the bytes that are currently at those memory locations have been moved where they belong; when the ...

Get Find the Bug A Book of Incorrect Programs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.