C memmove function

« Previous

Synopsis:

Example

#include <stdio.h>
void* memmove(void* s, const void* ct, int n); 

Description:

Copies n characters from ct to s and returns s. s will not be corrupted if objects overlap.

Return Value

The memmove function returns s after moving n characters.

Example

Example

#include <stdio.h>
int main() {
  static char buf [] = "This is line 1 \n"
                       "This is line 2 \n"
                       "This is line 3 \n";
  printf ("buf before = %s\n", buf);
  memmove (&buf [0], &buf [16], 32);
  printf ("buf after = %s\n", buf);
  return 0;
}

Output Will Be :

Output

buf before = This is line 1
This is line 2
This is line 3
buf after = This is line 2
This is line 3
This is line 3


« Previous
Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!