memmove function(Copy Memory Block) in C Language – example and detail

In the C Programming Language, the memmove characteristic copies n characters from the object pointed to through s2 into the object pointed to by using s1. It returns a pointer to the destination.

The memmove characteristic will work if the objects overlap.


The syntax for the memmove characteristic in the C Language is:

void *memmove(void *s1, const void *s2, size_t n);

Parameters or Arguments

s1 An array where s2 will be copied to. s2 The string to be copied. n The quantity of characters to copy.


The strcpy function returns s1.

Required Header

In the C Language, the required header for the strcpy function is:

#include <string.h>

Applies To

In the C Language, the strcpy function can be used in the following versions:

ANSI/ISO 9899-1990

Similar Functions

Other C features that are similar to the memmove function:

memcpy function strcpy function strncpy characteristic