RAD Studio
ContentsIndex
PreviousUpNext
memmove

Header File 

mem.h, string.h  

Category 

Memory and String Manipulation Routines 

Prototype 

void *memmove(void *dest, const void *src, size_t n); 

Description 

Copies a block of n bytes. 

memmove copies a block of n bytes from src to dest. Even when the source and destination blocks overlap, bytes in the overlapping locations are copied correctly. 

Return Value 

memmove returns dest. 

Example  

#include <string.h>
#include <stdio.h>
int main(void)
{
  char *dest = "abcdefghijklmnopqrstuvwxyz0123456789";
  char *src = "******************************";
  printf("destination prior to memmove: %s\n", dest);
  memmove(dest, src, 26);
  printf("destination after memmove:    %s\n", dest);
  return 0;
}

Portability

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
memmove 
_fmemmove 
 
 
 
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!