11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library FunctionsMEMCPYSynopsis#include void * memcpy (void * d, const void * s, size_t n)DescriptionThe memcpy() function copies n bytes of memory starting from the location pointed to by s tothe block of memory pointed to by d. The result of copying overlapping blocks is undefined. Thememcpy() function differs from strcpy() in that it copies a specified number of bytes, rather than allbytes up to a null terminator.Example#include #include voidmain (void){char buf[80];}memset(buf, 0, sizeof buf);memcpy(buf, "a partial string", 10);printf("buf = ’%s’\n", buf);See Alsostrncpy(), strncmp(), strchr(), memset()Return ValueThe memcpy() routine returns its first argument.169

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!