memmove : memmove « string.h « C Tutorial






ItemValue
Header filestring.h
Declarationvoid *memmove(void *to, const void *from, size_t count);
Functionmoves count characters from *from into *to.
Returnreturns *to.


#include <stdio.h>
  #include <string.h>

  #define SIZE 80

  int main(void)
  {
    char str[SIZE], *p;

    strcpy(str, "AAAAAAAAAAAAAAAAAAAAAAAAA");
    p = str + 10;

    memmove(str, p, SIZE);
    printf("result after shift: %s", str);

    return 0;
  }
result after shift: AAAAAAAAAAAAAAA








24.4.memmove
24.4.1.memmove