GeekInterview.com
Series: Subject:
Question: 114 of 271

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

Asked by: Interview Candidate | Asked on: Jun 24th, 2005
Showing Answers 1 - 1 of 1 Answers
Linto VJ

Answered On : Aug 31st, 2006

 
   void *memmove(void *DST, const void *SRC, size_t LENGTH);

   This  function moves LENGTH characters from the block of memory start-
   ing at `*SRC' to the memory starting at `*DST'.  `memmove'  reproduces
   the characters correctly at `*DST' even if the two areas overlap.


   void* memcpy(void *OUT, const void *IN, size_t N);
 
   This  function  copies N bytes from the memory region pointed to by IN
   to the memory region pointed to by OUT.

    If the regions overlap, the behavior is undefined.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.