#AVL Tree
4 messages in this thread
memcpy() is a generic routine, usually implement in assembler for the added
speed possible. it CAN be done in C, but that would not take advantage of
built-in instructions on particular machines, such as the LDIR of the Z80 and
MOVS on the 8086.
char *memcpy(dest,src,count)
char *dest,*src;
int count;
/* copy count characters [or bytes] from src to dest */
for now, i'll leave the coding up to you, but your compiler SHOULD have an
equivalent function – it has been in Unix libraries since before version 7! it
_may_ be named move(), or something similar, however.
The strncpy() function supplied in the libraries of most compilers performs the
same job. Okay, its going to be written in C instead of assembly, but its a
solution to his problem.
Doesn't strncpy() quit when it reaches a zero byte?