IT. Expert System.

C

memmove()


It is used to copy a specified number of bytes from one memory to another or to overlap on same memory. Difference between memmove and memcpy is, overlap can happen on memmove whereas memcpy should be done in non-destructive way

Syntax:
void *memmove(void *dest, void *src, size_t count);


Example:

memmove( ) function is used to copy a specified number of bytes from one memory to another or to overlap on same memory.
#include 
#include 
int main()
{
  // define two identical arrays
  char str1[10] = "technicia";

    printf("str1 before memmove\n");
    printf("str1 = %s\n ", str1);

  if (memmove(str1+2,str1, strlen(str1)))
  {
    printf("Elements in str1 are moved/overlapped on str1.\n");
    printf("str1 = %s \n", str1);
  }
  else
    printf("Error while coping str1 into str2.\n");
  return 0;
}
 Output:

str1 before memmove
str1 = technicia
Elements in str1 are moved/overlapped on str1 .
str1 = tetechnicia


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1377 / . Delta: 0.00630 с