Download 019P Manual - Digi-Key
Transcript
Library Functions
MEMCPY
Synopsis
#include <string.h>
/* For baseline and midrange processors */
void * memcpy (void * d, const void * s, size_t n)
/* For high-end processors */
far void * memcpy (far void * d, const void * s, size_t n)
Description
The memcpy() function copies n bytes of memory starting from the location pointed to by s to
the block of memory pointed to by d. The result of copying overlapping blocks is undefined. The
memcpy() function differs from strcpy() in that it copies a specified number of bytes, rather than all
bytes up to a null terminator.
Example
#include <string.h>
#include <stdio.h>
void
main (void)
{
char buf[80];
memset(buf, 0, sizeof buf);
memcpy(buf, "a partial string", 10);
printf("buf = ’%s’\n", buf);
}
See Also
strncpy(), strncmp(), strchr(), memset()
255
Related documents
Manual - IS MU
HI-TECH C for PIC10/12/16 User`s Guide
032 Manual - Digi-Key
Manual - Digi-Key
US letter format
ND 2100G Manual
MPLAB® XC8 C Compiler Version 1.20 Release Notes - Digi-Key
as a PDF
"Dough It Yourself" Handbook
£10,000 prize draw
HI-TECH C for PIC10/12/16 User's Guide
Untitled - 深圳市英锐恩科技有限公司