How to use memmove() function to copy N bytes to same source in C

1 Answer

0 votes
#include <stdio.h>
#include <string.h>
 
int main(void)
{
    char s[] = "c c++ java";
   
    memmove(s, s + 6, 4 * sizeof(char));
    puts(s);
 
    return 0;
}
   
     
/*
       
run:
 
java+ java
 
*/

 



answered Jul 7, 2018 by avibootz

Related questions

...