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 are the differences between c and java?

  Apart from the obvious differences in syntax the single biggest difference is that Java is an object orientated programming language while C is not (C's big brother C++

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 the difference between C and HTML?

There's a lot. Firstly, HTML is a markup language. It doesn't contain any logical operators or conditionals. (You can't do math, and you can't decide what to do.) It's really

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 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

Difference between preemptive and non preemptive system.with example?

Preemptive scheduling allows a process to be interrupted in the midst of its execution, taking the CPU away and allocating it to another process. Non-preemptive scheduling en

Difference Between C and .net?

  Answer   C is a programming language. You can create applications using C on many platforms by finding the right compiler (ex: gcc on Linux/Unix or Visual Studio i

What is difference between interquery parallelism and intraquery parallelism.Explain with an example?

Inter-query parallelism results from the ability to execute multiple queries at the same time while intra-query parallelism is achieved by breaking up a single query into a nu

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

What is the Difference between C and C languages?

C languages are often based originally on the C language but no longer adhere to it's tenets: often they supersede the original ANSI-92 C language. C++, Objective C, C-, and C

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 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