memmove - C string.h

C examples for string.h:memmove

Type

function

From

<cstring> 
<string.h>

Description

Move the values of num bytes from source to destination.

Prototype

void * memmove ( void * destination, const void * source, size_t num );

Parameters

Parameter Description
destination Pointer to the destination array.
source Pointer to the source of data.
num Number of bytes to move.

Return Value

destination is returned.

Demo Code

#include <stdio.h>
#include <string.h>

int main ()//from w  ww. j a v a 2 s  . c o  m
{
  char str[] = "this is a test.";
  memmove (str+20,str+15,11);
  puts (str);
  return 0;
}

Related Tutorials