Contact: aviboots(AT)netvision.net.il
39,884 questions
51,810 answers
573 users
#include <stdio.h> #include <string.h> int main(void) { char s[] = "abc def ghi jkl"; char s1[32]; memmove(s1, s + 4, 3 * sizeof(char)); puts(s); puts(s1); return 0; } /* run: abc def ghi jkl def */
#include <stdio.h> #include <string.h> int main(void) { char s[] = "abc def ghi jkl"; memmove(s, s + 4, 3 * sizeof(char)); puts(s); return 0; } /* run: def def ghi jkl */
#include <stdio.h> #include <string.h> int main(void) { char s[256] = "Programming is complete fun"; memmove(s + 24, s + 15, 12 * sizeof(char)); puts(s); return 0; } /* run: Programming is complete complete fun */