Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

memmove - Shift the characters in C


  #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;
  }

Output:
Result After Shift: AAAAAAAAAAAAAAA