What would you like to do?

Difference between memcpy and memmove in C with example?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

Its similar to typing without insert key ON and OFF
str1="strings are good");
returns------ strings are are good
returns------ strings are read

memcpy - just copies from source to destination.
memmove - copies from source to destination if buffers overlap, every character is read before another character is written to the same location
memcpy() copies the bytes of data between memory blocks. If the block of memory overlaps, the function might not work properly. Use memmove() to deal with overlapping memory blocks.

memmove() is very much like memcpy() but very flexible as it handles overlapping of memory blocks.
4 people found this useful
Thanks for the feedback!

What are the differences between memcpy vs strcpy?

memcpy is general purpose copy. and strcpy is specific for string copying. strcpy will copy the source string to destination string and terminate it with '\\0' character but m

What is the difference between post and pre increment unary operators in c with example?

  They both increment the variable. But the value returned by the pre-increment operator is the value of the variable after it has been incremented, while the value return

What is example difference between a base and an alkali?

The difference is not very big, even quite formally, I'd say. Alkali are hydroxidesBase is a substance capable of reaction with protons (H+ ions) donated by acids. So: All

Difference between jig and fixture with example?

   What is the difference between jig and fixture?         Mechanical Engineering Questions    Answers.com > Wiki Answers > Categories > Technology >

Difference Between strcpy and memcpy?

memcpy will copy NULL bytes also, but strcpy will stop copying if it encounters NULL Byte, since it consider NULL as a terminating character. cheers, som shekhar And anoth

What is syntax of memcpy?

  memcpy function is used to copy memory area.   Syntax   ------   void *memcpy(void *dest, const void *src, size_t n);     *dest is a destination string

What is the difference between manufacturing and production with examples?

Production is a general term, its can be refer to anything as producing in Industries, Like Automobile industry producing different types of Cars,bikes and etc For example,

Difference between sensors and transducers with example?

a transducer is a device that converts one form of energy into another form for say light emitting diodes that converts electric energy into light energy , whereas sensors a

Example of the difference between distance and displacement?

The distance something travels is the summation of the total displacement before every change in direction. The displacement is the net distance traveled. For example, if you

What is the difference between isomerase and epimerase with examples?

In biochemistry, an isomerase is an enzyme that catalyzes the structural rearrangement of isomers. F6P can be converted to glucose-6-phosphate (G6P) by phosphoglucoisomera

Difference between RAM and ROM with example?

RAM - Random Access Memory The computer reads the information from the memory and actions commands - The memory cannot be changed added to or deleted and keeps its original pr

What is the difference between an illustration and an example?

There are no major difference in both term but we can say that illustration this term use only in when we are talking about the mathematical example. In other hand we can use

What is the difference between sample and example?

Definition of example is one (as an item or incident) that  is representative of all of a group or type.    Similarly, a definition of sample is   1) a representat