Code Snippets C

//Declaration: void *memmove(void *to, const void *from, size_t count);
//Return: returns *to.
#include
#include
#define SIZE 100
int main(void)
{
char str[SIZE], *p;
strcpy(str, "xxxxxxxxxxxxxxxxxxxxxxxxx");
p = str + 13;
memmove(str, p, SIZE);
printf("result after shift: %s", str);
return 0;
}
/*
result after shift: xxxxxxxxxxxx*/