Keil Logo


#include <string.h>

void *memmove (
  void *dest,          /* destination buffer */
  const void *src,     /* source buffer */
  unsigned int len);   /* bytes to move */

The memmove function copies len bytes from src to dest. If these memory buffers overlap, the memmove function ensures that bytes in src are copied to dest before being overwritten.

Return Value

The memmove function returns dest.

See Also

memccpy, memchr, memcmp, memcpy, memset

#include <string.h>
#include <stdio.h> /* for printf */

void tst_memmove (void) {
  static char buf [] = "This is line 1 "
                       "This is line 2 "
                       "This is line 3 ";

  printf ("buf before = %s\n", buf);
  memmove (&buf [0], &buf [16], 32);
  printf ("buf after = %s\n", buf);
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.