Mega Code Archive
Categories
/
C
/
Code Snippets
Memory move
#include
#include
#define SIZE 100 int main(void) { char str[SIZE], *p; strcpy(str, "I Love Clementine"); p = str + 10; memmove(str, p, SIZE); printf("result after shift: %s", str); return 0; }