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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Library FunctionsSTRCPYSynopsis#include char * strcpy (char * s1, const char * s2)DescriptionThis function copies a null terminated string s2 to a character array pointed to by s1. The destinationarray must be large enough to hold the entire string, including the null terminator.Example#include #include voidmain (void){char buffer[256];char * s1, * s2;}strcpy(buffer, "Start of line");s1 = buffer;s2 = " ... end of line";strcat(s1, s2);printf("Length = %d\n", strlen(buffer));printf("string = \"%s\"\n", buffer);See Alsostrncpy(), strlen(), strcat(), strlen()Return ValueThe destination buffer pointer s1 is returned.203

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

Saved successfully!

Ooh no, something went wrong!