What is the difference between the functions memmove() and memcpy()?



What is the difference between the functions memmove() and memcpy()?..

Answer / Jyoti Chaudhary

Both memmove() and memcpy() are used to copy memory blocks in C++. However, their behavior differs when the source and destination memory blocks overlap. memmove() can handle this case by ensuring that memory is copied safely, while memcpy() does not check for overlapping blocks, which might lead to undefined behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How do you declare A pointer to a function which receives nothing and returns nothing

1 Answers  


What does catch(…) mean?

1 Answers  


Define friend function.

1 Answers  


How many lines of code you have written for a single program?

4 Answers   BoA,


What are the advantages of c++?

4 Answers  


How to access a variable of the structure?

1 Answers  


What are the differences between the function prototype and the function defi-nition?

1 Answers  


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1 Answers  


What is the difference between the indirection operator and the address of oper-ator?

1 Answers  


What are proxy objects?

2 Answers  


Write about the use of the virtual destructor?

1 Answers  


How would you differentiate between a pre and post increment operators while overloading?

1 Answers  


Categories